home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_mtools.idb / usr / freeware / catman / u_man / cat1 / mtools.Z / mtools
Encoding:
Text File  |  1998-10-28  |  116.8 KB  |  2,707 lines

  1.  
  2.  
  3.  
  4.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNaaaammmmeeee
  9.       mtools - utilities to    access DOS disks in Unix.
  10.  
  11.      IIIInnnnttttrrrroooodddduuuuccccttttiiiioooonnnn
  12.       Mtools is a public domain collection of tools    to allow Unix
  13.       systems to manipulate    MS-DOS files: read, write, and move
  14.       around files on an MS-DOS filesystem (typically a floppy
  15.       disk).  Where    reasonable, each program attempts to emulate
  16.       the MS-DOS equivalent    command. However, unnecessary
  17.       restrictions and oddities of DOS are not emulated. For
  18.       instance, it is possible to move subdirectories from one
  19.       subdirectory to another.
  20.  
  21.       Mtools is sufficient to give access to MS-DOS    filesystems.
  22.       For instance,    commands such as mdir a: work on the a:    floppy
  23.       without any preliminary mounting or initialization (assuming
  24.       the default `/etc/mtools.conf' works on your machine).  With
  25.       mtools, one can change floppies too without unmounting and
  26.       mounting.
  27.  
  28.      WWWWhhhheeeerrrreeee ttttoooo ggggeeeetttt mmmmttttoooooooollllssss
  29.       Mtools can be    found at the following places (and their
  30.       mirrors):
  31.  
  32.          hhhhttttttttpppp::::////////mmmmttttoooooooollllssss....lllliiiinnnnuuuuxxxx....lllluuuu////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
  33.          ffffttttpppp::::////////wwwwwwwwwwww....ttttuuuuxxxx....oooorrrrgggg////ppppuuuubbbb////kkkknnnnaaaaffffffff////mmmmttttoooooooollllssss////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
  34.          ffffttttpppp::::////////ssssuuuunnnnssssiiiitttteeee....uuuunnnncccc....eeeedddduuuu////ppppuuuubbbb////LLLLiiiinnnnuuuuxxxx////uuuuttttiiiillllssss////ddddiiiisssskkkk----mmmmaaaannnnaaaaggggeeeemmmmeeeennnntttt////mmmmttttoooooooollllssss----3333....9999....1111....ttttaaaarrrr....ggggzzzz
  35.  
  36.  
  37.  
  38.       Before reporting a bug, make sure that it has    not yet    been
  39.       fixed    in the Alpha patches which can be found    at:
  40.  
  41.          hhhhttttttttpppp::::////////mmmmttttoooooooollllssss....lllliiiinnnnuuuuxxxx....lllluuuu////
  42.          ffffttttpppp::::////////wwwwwwwwwwww....ttttuuuuxxxx....oooorrrrgggg////ppppuuuubbbb////kkkknnnnaaaaffffffff////mmmmttttoooooooollllssss
  43.  
  44.  
  45.  
  46.       These    patches    are named mtools-_v_e_r_s_i_o_n-_d_d_m_m.taz, where
  47.       version stands for the base version, _d_d for the day and _m_m
  48.       for the month. Due to    a lack of space, I usually leave only
  49.       the most recent patch.
  50.  
  51.       There    is an mtools mailing list at mtools @ tux.org .
  52.       Please send all bug reports to this list.  You may subscribe
  53.       to the list by sending a message with    'subscribe mtools @
  54.       tux.org' in its body to majordomo @ tux.org .    (N.B. Please
  55.       remove the spaces around the "@" both    times. I left them
  56.       there    in order to fool spambots.)  Announcements of new
  57.       mtools versions will also be sent to the list, in addition
  58.       to the linux announce    newsgroups.  The mailing list is
  59.       archived at http://www.tux.org/hypermail/mtools/latest
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 7/15/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  71.  
  72.  
  73.  
  74.      CCCCoooommmmmmmmoooonnnn ffffeeeeaaaattttuuuurrrreeeessss ooooffff    aaaallllllll mmmmttttoooooooollllssss ccccoooommmmmmmmaaaannnnddddssss
  75.     OOOOppppttttiiiioooonnnnssss    aaaannnndddd ffffiiiilllleeeennnnaaaammmmeeeessss
  76.       MS-DOS filenames are composed    of a drive letter followed by
  77.       a colon, a subdirectory, and a filename. Only    the filename
  78.       part is mandatory, the drive letter and the subdirectory are
  79.       optional. Filenames without a    drive letter refer to Unix
  80.       files. Subdirectory names can    use either the '/' or '\'
  81.       separator.  The use of the '\' separator or wildcards
  82.       requires the names to    be enclosed in quotes to protect them
  83.       from the shell. However, wildcards in    Unix filenames should
  84.       not be enclosed in quotes, because here we wwwwaaaannnntttt the shell to
  85.       expand them.
  86.  
  87.       The regular expression "pattern matching" routines follow
  88.       the Unix-style rules.     For example, `*' matches all MS-DOS
  89.       files    in lieu    of `*.*'.  The archive,    hidden,    read-only and
  90.       system attribute bits    are ignored during pattern matching.
  91.  
  92.       All options use the -    (minus)    as their first character, not
  93.       / as you'd expect in MS-DOS.
  94.  
  95.       Most mtools commands allow multiple filename parameters,
  96.       which    doesn't    follow MS-DOS conventions, but which is    more
  97.       user-friendly.
  98.  
  99.       Most mtools commands allow options that instruct them    how to
  100.       handle file name clashes. See    section    name clashes, for more
  101.       details on these. All    commands accept    the -V flags which
  102.       prints the version, and most accept the -v flag, which
  103.       switches on verbose mode. In verbose mode, these commands
  104.       print    out the    name of    the MS-DOS files upon which they act,
  105.       unless stated    otherwise. See section Commands, for a
  106.       description of the options which are specific    to each
  107.       command.
  108.  
  109.     DDDDrrrriiiivvvveeee lllleeeetttttttteeeerrrrssss
  110.       The meaning of the drive letters depends on the target
  111.       architectures.  However, on most target architectures, drive
  112.       A is the first floppy    drive, drive B is the second floppy
  113.       drive    (if available),    drive J    is a Jaz drive (if available),
  114.       and drive Z is a Zip drive (if available).  On those systems
  115.       where    the device name    is derived from    the SCSI id, the Jaz
  116.       drive    is assumed to be at Scsi target    4, and the Zip at Scsi
  117.       target 5 (factory default settings).    On Linux, both drives
  118.       are assumed to be the    second drive on    the Scsi bus
  119.       (/dev/sdb). The default settings can be changes using    a
  120.       configuration    file (See section Configuration).
  121.  
  122.     CCCCuuuurrrrrrrreeeennnntttt    wwwwoooorrrrkkkkiiiinnnngggg    ddddiiiirrrreeeeccccttttoooorrrryyyy
  123.       The mcd command (`mcd') is used to establish the device and
  124.       the current working directory    (relative to the MS-DOS
  125.       filesystem), otherwise the default is    assumed    to be A:/.
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 7/15/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  137.  
  138.  
  139.  
  140.       However, unlike MS-DOS, there    is only    one working directory
  141.       for all drives, and not one per drive.
  142.  
  143.     VVVVFFFFAAAATTTT----ssssttttyyyylllleeee lllloooonnnngggg    ffffiiiilllleeee nnnnaaaammmmeeeessss
  144.       This version of mtools supports VFAT style long filenames.
  145.       If a Unix filename is    too long to fit    in a short DOS name,
  146.       it is    stored as a VFAT long name, and    a companion short name
  147.       is generated.    This short name    is what    you see    when you
  148.       examine the disk with    a pre-7.0 version of DOS.
  149.        The following table shows some examples of short names:
  150.  
  151.          LLLLoooonnnngggg nnnnaaaammmmeeee         MMMMSSSS----DDDDOOOOSSSS nnnnaaaammmmeeee      RRRReeeeaaaassssoooonnnn ffffoooorrrr tttthhhheeee cccchhhhaaaannnnggggeeee
  152.          ------------------------------------         ----------------------------------------         ------------------------------------------------------------------------------------
  153.          tttthhhhiiiissssiiiissssaaaatttteeeesssstttt     TTTTHHHHIIIISSSSIIIISSSS~~~~1111         ffffiiiilllleeeennnnaaaammmmeeee ttttoooooooo lllloooonnnngggg
  154.          aaaallllaaaaiiiinnnn....kkkknnnnaaaaffffffff     AAAALLLLAAAAIIIINNNN~~~~1111....KKKKNNNNAAAA     eeeexxxxtttteeeennnnssssiiiioooonnnn ttttoooooooo lllloooonnnngggg
  155.          pppprrrrnnnn....ttttxxxxtttt         PPPPRRRRNNNN~~~~1111....TTTTXXXXTTTT         PPPPRRRRNNNN iiiissss aaaa ddddeeeevvvviiiicccceeee nnnnaaaammmmeeee
  156.          ....aaaabbbbcccc         AAAABBBBCCCC~~~~1111         nnnnuuuullllllll ffffiiiilllleeeennnnaaaammmmeeee
  157.          hhhhooootttt++++ccccoooolllldddd         HHHHOOOOTTTT____CCCCOOOO~~~~1111         iiiilllllllleeeeggggaaaallll cccchhhhaaaarrrraaaacccctttteeeerrrr
  158.  
  159.  
  160.  
  161.        As you see, the following transformations happen to derive
  162.       a short name:
  163.  
  164.       *    Illegal characters are replaced by underscores. The
  165.            illegal characters are ;+=[]',\"*\\<>/?:|.
  166.  
  167.       *    Extra dots, which cannot    be interpreted as a main
  168.            name/extension separator    are removed
  169.  
  170.       *    A ~_n number is generated,
  171.  
  172.       *    The name    is shortened so    as to fit in the 8+3
  173.            limitation
  174.  
  175.        The initial Unix-style file name (whether long or short) is
  176.       also called the _p_r_i_m_a_r_y name,    and the    derived    short name is
  177.       also called the _s_e_c_o_n_d_a_r_y name.
  178.  
  179.        Example:
  180.  
  181.           mmmmccccooooppppyyyy ////eeeettttcccc////mmmmoooottttdddd aaaa::::RRRReeeeaaaallllllllyyyylllloooonnnnggggnnnnaaaammmmeeee
  182.  
  183.        Mtools creates a VFAT entry for Reallylongname, and uses
  184.       REALLYLO as a    short name. Reallylongname is the primary
  185.       name,    and REALLYLO is    the secondary name.
  186.  
  187.           mmmmccccooooppppyyyy ////eeeettttcccc////mmmmoooottttdddd aaaa::::mmmmoooottttdddd
  188.  
  189.        Motd    fits into the DOS filename limits. Mtools doesn't need
  190.       to derivate another name. Motd is the    primary    name, and
  191.       there    is no secondary    name.
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 7/15/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  203.  
  204.  
  205.  
  206.        In a    nutshell: The primary name is the long name, if    one
  207.       exists, or the short name if there is    no long    name.
  208.  
  209.        Although VFAT is much more flexible than FAT, there are
  210.       still    names that are not acceptable, even in VFAT. There are
  211.       still    some illegal characters    left (\"*\\<>/?:|), and    device
  212.       names    are still reserved.
  213.  
  214.          UUUUnnnniiiixxxx nnnnaaaammmmeeee         LLLLoooonnnngggg nnnnaaaammmmeeee        RRRReeeeaaaassssoooonnnn ffffoooorrrr tttthhhheeee cccchhhhaaaannnnggggeeee
  215.          ------------------------------------         ----------------------------------------         ------------------------------------------------------------------------------------
  216.          pppprrrrnnnn         pppprrrrnnnn----1111         PPPPRRRRNNNN iiiissss aaaa ddddeeeevvvviiiicccceeee nnnnaaaammmmeeee
  217.          aaaabbbb::::cccc         aaaabbbb____cccc----1111         iiiilllllllleeeeggggaaaallll cccchhhhaaaarrrraaaacccctttteeeerrrr
  218.  
  219.  
  220.  
  221.        As you see, the following transformations happen if a long
  222.       name is illegal:
  223.  
  224.       *    Illegal characters are replaces by underscores,
  225.  
  226.       *    A -_n number is generated,
  227.  
  228.     NNNNaaaammmmeeee ccccllllaaaasssshhhheeeessss
  229.       When writing a file to disk, its long    name or    short name may
  230.       collide with an already existing file    or directory. This may
  231.       happen for all commands which    create new directory entries,
  232.       such as mcopy, mmd, mren, mmove, mwrite and mread. When a
  233.       name clash happens, mtools asks you what it should do. It
  234.       offers several choices:
  235.  
  236.       overwrite
  237.            Overwrites the existing file. It    is not possible    to
  238.            overwrite a directory with a file.
  239.  
  240.       rename
  241.            Renames the newly created file. Mtools prompts for the
  242.            new filename
  243.  
  244.       autorename
  245.            Renames the newly created file. Mtools chooses a    name
  246.            by itself, without prompting
  247.  
  248.       skip
  249.            Gives up    on this    file, and moves    on to the next (if
  250.            any)
  251.  
  252.       To chose one of these    actions, type its first    letter at the
  253.       prompt. If you use a lower case letter, the action only
  254.       applies for this file    only, if you use an upper case letter,
  255.       the action applies to    all files, and you won't be prompted
  256.       again.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 7/15/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  269.  
  270.  
  271.  
  272.       You may also chose actions (for all files) on    the command
  273.       line,    when invoking mtools:
  274.  
  275.       -o   Overwrites primary names    by default.
  276.  
  277.       -O   Overwrites secondary names by default.
  278.  
  279.       -r   Renames primary name by default.
  280.  
  281.       -R   Renames secondary name by default.
  282.  
  283.       -a   Autorenames primary name    by default.
  284.  
  285.       -A   Autorenames secondary name by default.
  286.  
  287.       -s   Skip primary name by default.
  288.  
  289.       -S   Skip secondary name by default.
  290.  
  291.       -m   Ask user    what to    do with    primary    name.
  292.  
  293.       -M   Ask user    what to    do with    secondary name.
  294.  
  295.       Note that for    command    line switches lower/upper
  296.       differentiates between primary/secondary name    whereas    for
  297.       interactive choices, lower/upper differentiates between
  298.       just-this-time/always.
  299.  
  300.       The primary name is the name as displayed in Windows 95 or
  301.       Windows NT:  i.e. the    long name if it    exists,    and the    short
  302.       name otherwise.  The secondary name is the "hidden" name,
  303.       i.e. the short name if a long    name exists.
  304.  
  305.       By default, the user is prompted if the primary name
  306.       clashes, and the secondary name is autorenamed.
  307.  
  308.       If a name clash occurs in a Unix directory, mtools only asks
  309.       whether to overwrite the file, or to skip it.
  310.  
  311.     CCCCaaaasssseeee sssseeeennnnssssiiiittttiiiivvvviiiittttyyyy ooooffff tttthhhheeee    VVVVFFFFAAAATTTT ffffiiiilllleeeessssyyyysssstttteeeemmmm
  312.       The VFAT filesystem is able to remember the case of the
  313.       filenames. However, filenames    which differ only in case are
  314.       not allowed to coexist in the    same directory.    For example if
  315.       you store a file called LongFileName on a VFAT filesystem,
  316.       mdir shows this file as LongFileName,    and not    as
  317.       Longfilename.    However, if you    then try to add    LongFilename
  318.       to the same directory, it is refused,    because    case is
  319.       ignored for clash checks.
  320.  
  321.       The VFAT filesystem allows to    store the case of a filename
  322.       in the attribute byte, if all    letters    of the filename    are
  323.       the same case, and if    all letters of the extension are the
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 7/15/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  335.  
  336.  
  337.  
  338.       same case too. Mtools    uses this information when displaying
  339.       the files, and also to generate the Unix filename when
  340.       mcopying to a    Unix directory.    This may have unexpected
  341.       results when applied to files    written    using an pre-7.0
  342.       version of DOS:  Indeed, the old style filenames map to all
  343.       upper    case. This is different    from the behavior of the old
  344.       version of mtools which used to generate lower case Unix
  345.       filenames.
  346.  
  347.     hhhhiiiigggghhhh ccccaaaappppaaaacccciiiittttyyyy ffffoooorrrrmmmmaaaattttssss
  348.       Mtools supports a number of formats which allow to store
  349.       more data on disk as usual. Due to different operating
  350.       system abilities, these formats are not supported on all
  351.       OS'es. Mtools    recognizes these formats transparently where
  352.       supported.
  353.  
  354.       In order to format these disks, you need to use an operating
  355.       system specific tool.    For Linux, suitable floppy tools can
  356.       be found in the fdutils package at the following locations~:
  357.  
  358.          ftp://www.tux.org/pub/knaff/fdutils/.
  359.          ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/fdutils-*
  360.  
  361.  
  362.  
  363.       See the manpages included in that package for    further
  364.       detail: Use superformat to format all    formats    except XDF,
  365.       and use xdfcopy to format XDF.
  366.  
  367.       MMMMoooorrrreeee sssseeeeccccttttoooorrrrssss
  368.       The oldest method of fitting more data on a disk is to use
  369.       more sectors and more    cylinders. Although the    standard
  370.       format uses 80 cylinders and 18 sectors (on a    3 1/2 high
  371.       density disk), it is possible    to use up to 83    cylinders (on
  372.       most drives) and up to 21 sectors. This method allows    to
  373.       store    up to 1743K on a 3 1/2 HD disk.    However, 21 sector
  374.       disks    are twice as slow as the standard 18 sector disks
  375.       because the sectors are packed so close together that    we
  376.       need to interleave them. This    problem    doesn't    exist for 20
  377.       sector formats.
  378.  
  379.       These    formats    are supported by numerous DOS shareware
  380.       utilities such as fdformat and vgacopy. In his infinite
  381.       hybris, Bill Gate$ believed that he invented this, and
  382.       called it `DMF disks', or `Windows formatted disks'. But in
  383.       reality, it has already existed years    before!    Mtools
  384.       supports these formats on Linux, on SunOs and    on the DELL
  385.       Unix PC.
  386.  
  387.       BBBBiiiiggggggggeeeerrrr sssseeeeccccttttoooorrrrssss
  388.       By using bigger sectors it is    possible to go beyond the
  389.       capacity which can be    obtained by the    standard 512-byte
  390.  
  391.  
  392.  
  393.      Page 6                         (printed 7/15/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  401.  
  402.  
  403.  
  404.       sectors. This    is because of the sector header. The sector
  405.       header has the same size, regardless of how many data    bytes
  406.       are in the sector. Thus, we save some    space by using _f_e_w_e_r,
  407.       but bigger sectors. For example, 1 sector of 4K only takes
  408.       up header space once,    whereas    8 sectors of 512 bytes have
  409.       also 8 headers, for the same amount of useful    data.
  410.  
  411.       This method allows to    store up to 1992K on a 3 1/2 HD    disk.
  412.  
  413.       Mtools supports these    formats    only on    Linux.
  414.  
  415.       2222mmmm
  416.       The 2m format    was originally invented    by Ciriaco Garcia de
  417.       Celis. It also uses bigger sectors than usual    in order to
  418.       fit more data    on the disk.  However, it uses the standard
  419.       format (18 sectors of    512 bytes each)    on the first cylinder,
  420.       in order to make these disks easyer to handle    by DOS.    Indeed
  421.       this method allows to    have a standard    sized bootsector,
  422.       which    contains a description of how the rest of the disk
  423.       should be read.
  424.  
  425.       However, the drawback    of this    is that    the first cylinder can
  426.       hold less data than the others. Unfortunately, DOS can only
  427.       handle disks where each track    contains the same amount of
  428.       data.    Thus 2m    hides the fact that the    first track contains
  429.       less data by using a _s_h_a_d_o_w _F_A_T. (Usually, DOS stores    the
  430.       FAT in two identical copies, for additional safety.  XDF
  431.       stores only one copy,    and it tells DOS that it stores    two.
  432.       Thus the same    that would be taken up by the second FAT copy
  433.       is saved.) This also means that your should nnnneeeevvvveeeerrrr uuuusssseeee    aaaa 2222mmmm
  434.       ddddiiiisssskkkk ttttoooo ssssttttoooorrrreeee    aaaannnnyyyytttthhhhiiiinnnngggg eeeellllsssseeee tttthhhhaaaannnn aaaa DDDDOOOOSSSS ffffssss.
  435.  
  436.       Mtools supports these    format only on Linux.
  437.  
  438.       XXXXDDDDFFFF
  439.       XDF is a high    capacity format    used by    OS/2. It can hold 1840
  440.       K per    disk. That's lower than    the best 2m formats, but its
  441.       main advantage is that it is fast: 600 milliseconds per
  442.       track. That's    faster than the    21 sector format, and almost
  443.       as fast as the standard 18 sector format. In order to    access
  444.       these    disks, make sure mtools    has been compiled with XDF
  445.       support, and set the use_xdf variable    for the    drive in the
  446.       configuration    file. See section Compiling mtools and `misc
  447.       variables', for details on how to do this. Fast XDF access
  448.       is only available for    Linux kernels which are    more recent
  449.       than 1.1.34.
  450.  
  451.       Mtools supports this format only on Linux.
  452.  
  453.       CCCCaaaauuuuttttiiiioooonnnn //// AAAAtttttttteeeennnnttttiiiioooonnnn ddddiiiissssttttrrrriiiibbbbuuuuttttoooorrrrssss: If mtools is compiled on a
  454.       Linux    kernel more recent than    1.3.34,    it won't run on    an
  455.       older    kernel.    However, if it has been    compiled on an older
  456.  
  457.  
  458.  
  459.      Page 7                         (printed 7/15/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  467.  
  468.  
  469.  
  470.       kernel, it still runs    on a newer kernel, except that XDF
  471.       access is slower. It is recommended that distribution
  472.       authors only include mtools binaries compiled    on kernels
  473.       older    than 1.3.34 until 2.0 comes out. When 2.0 will be out,
  474.       mtools binaries compiled on newer kernels may    (and should)
  475.       be distributed. Mtools binaries compiled on kernels older
  476.       than 1.3.34 won't run    on any 2.1 kernel or later.
  477.  
  478.     EEEExxxxiiiitttt ccccooooddddeeeessss
  479.       All the Mtools commands return 0 on success, 1 on utter
  480.       failure, or 2    on partial failure.  All the Mtools commands
  481.       perform a few    sanity checks before going ahead, to make sure
  482.       that the disk    is indeed an MS-DOS disk (as opposed to, say
  483.       an ext2 or minix disk). These    checks may reject partially
  484.       corrupted disks, which might otherwise still be readable. To
  485.       avoid    these checks, set the MTOOLS_SKIP_CHECK    environmental
  486.       variable or the corresponding    configuration file variable
  487.       (see section    global variables)
  488.  
  489.     BBBBuuuuggggssss
  490.       An unfortunate side effect of    not guessing the proper    device
  491.       (when    multiple disk capacities are supported)    is an
  492.       occasional error message from    the device driver.  These can
  493.       be safely ignored.
  494.  
  495.       The fat checking code    chokes on 1.72 Mb disks    mformatted
  496.       with pre-2.0.7 mtools. Set the environmental variable
  497.       MTOOLS_FAT_COMPATIBILITY (or the corresponding configuration
  498.       file variable, `global variables') to    bypass the fat
  499.       checking.
  500.  
  501.      HHHHoooowwww ttttoooo ccccoooonnnnffffiiiigggguuuurrrreeee mmmmttttoooooooollllssss ffffoooorrrr yyyyoooouuuurrrr eeeennnnvvvviiiirrrroooonnnnmmmmeeeennnntttt
  502.     DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  503.        This    sections explains the syntax of    the configurations
  504.       files    for mtools. The    configuration files are    called
  505.       `/usr/freeware/etc/mtools.conf' and `~/.mtoolsrc'. If    the
  506.       environmental    variable MTOOLSRC is set, its contents is used
  507.       as the filename for a    third configuration file. These
  508.       configuration    files describe the following items:
  509.  
  510.       *  Global configuration flags    and variables
  511.  
  512.       *  Per drive flags and variables
  513.  
  514.       *  Character translation tables
  515.  
  516.     LLLLooooccccaaaattttiiiioooonnnn ooooffff tttthhhheeee    ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeeessss
  517.       `/usr/freeware/etc/mtools.conf' is the system-wide
  518.       configuration    file, and `~/.mtoolsrc'    is the user's private
  519.       configuration    file.
  520.  
  521.       On some systems, the system-wide configuration file is
  522.  
  523.  
  524.  
  525.      Page 8                         (printed 7/15/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  533.  
  534.  
  535.  
  536.       called `/etc/defaults/mtools.conf' instead.
  537.  
  538.       GGGGeeeennnneeeerrrraaaallll ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn    ffffiiiilllleeee ssssyyyynnnnttttaaaaxxxx
  539.       The configuration files is made up of    sections. Each section
  540.       starts with a    keyword    identifying the    section    followed by a
  541.       colon.  Then follow variable assignments and flags. Variable
  542.       assignments take the following form:    name=value
  543.  
  544.       Flags    are lone keywords without an equal sign    and value
  545.       following them.  A section either ends at the    end of the
  546.       file or where    the next section begins.
  547.  
  548.       Lines    starting with a    hash (#) are comments. Newline
  549.       characters are equivalent to whitespace (except where    ending
  550.       a comment). The configuration    file is    case insensitive,
  551.       except for item enclosed in quotes (such as filenames).
  552.  
  553.     DDDDeeeeffffaaaauuuulllltttt    vvvvaaaalllluuuueeeessss
  554.       For most platforms, mtools contains reasonable compiled-in
  555.       defaults for physical    floppy drives.    Thus, you usually
  556.       don't    need to    bother with the    configuration file, if all you
  557.       want to do with mtools is to access your floppy drives. On
  558.       the other hand, the configuration file is needed if you also
  559.       want to use mtools to    access your hard disk partitions and
  560.       dosemu image files.
  561.  
  562.     GGGGlllloooobbbbaaaallll vvvvaaaarrrriiiiaaaabbbblllleeeessss
  563.       Global flags may be set to 1 or to 0.
  564.  
  565.       The following    global flags are recognized:
  566.  
  567.       MTOOLS_SKIP_CHECK
  568.            If this is set to 1, mtools skips most of its sanity
  569.            checks. This is needed to read some Atari disks which
  570.            have been made with the earlier ROMs, and which would
  571.            not be recognized otherwise.
  572.  
  573.       MTOOLS_FAT_COMPATIBILITY
  574.            If this is set to 1, mtools skips the fat size checks.
  575.            Some disks have a bigger    FAT than they really need to.
  576.            These are rejected if this option is not    set.
  577.  
  578.       MTOOLS_LOWER_CASE
  579.            If this is set to 1, mtools displays all-upper-case
  580.            short filenames as lowercase. This has been done    to
  581.            allow a behavior    which is consistent with older
  582.            versions    of mtools which    didn't know about the case
  583.            bits.
  584.  
  585.       MTOOLS_NO_VFAT
  586.            If this is set to 1, mtools won't generate VFAT entries
  587.            for filenames which are mixed-case, but otherwise legal
  588.  
  589.  
  590.  
  591.      Page 9                         (printed 7/15/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  599.  
  600.  
  601.  
  602.            dos filenames.  This is useful when working with    DOS
  603.            versions    which can't grok VFAT longnames, such as
  604.            FreeDos.
  605.  
  606.       MTOOLS_DOTTED_DIR
  607.            In a wide directory, prints the short name with a dot
  608.            instead of spaces separating the    basename and the
  609.            extension.
  610.  
  611.       MTOOLS_NAME_NUMERIC_TAIL
  612.            If this is set to one (default),    generate numeric tails
  613.            for all long names (~1).     If set    to zero, only generate
  614.            numeric tails if    otherwise a clash would    have happened.
  615.  
  616.       MTOOLS_TWENTY_FOUR_HOUR_CLOCK
  617.            If 1, uses the European notation    for times (twenty four
  618.            hour clock), else uses the UK/US    notation (am/pm)
  619.  
  620.       Example:  Inserting the following line into your
  621.       configuration    file instructs mtools to skip the sanity
  622.       checks:
  623.  
  624.            MMMMTTTTOOOOOOOOLLLLSSSS____SSSSKKKKIIIIPPPP____CCCCHHHHEEEECCCCKKKK====1111
  625.  
  626.  
  627.  
  628.       Global variables may also be set via the environment:
  629.  
  630.            eeeexxxxppppoooorrrrtttt MMMMTTTTOOOOOOOOLLLLSSSS____SSSSKKKKIIIIPPPP____CCCCHHHHEEEECCCCKKKK====1111
  631.  
  632.  
  633.  
  634.       Global string    variables may be set to    any value:
  635.  
  636.       MTOOLS_DATE_STRING
  637.            The format used for printing dates of files.  By
  638.            default,    is dd-mm-yyyy.
  639.  
  640.     PPPPeeeerrrr ddddrrrriiiivvvveeee ffffllllaaaaggggssss    aaaannnndddd vvvvaaaarrrriiiiaaaabbbblllleeeessss
  641.       GGGGeeeennnneeeerrrraaaallll iiiinnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
  642.       Per drive flags and values may be described in a drive
  643.       section. A drive section starts with drive "_d_r_i_v_e_l_e_t_t_e_r" :
  644.  
  645.       Then follow variable-value pairs and flags.
  646.  
  647.       This is a sample drive description:
  648.  
  649.            ddddrrrriiiivvvveeee aaaa::::
  650.          ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000"""" uuuusssseeee____xxxxddddffff====1111
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.      Page 10                         (printed 7/15/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  665.  
  666.  
  667.  
  668.       DDDDiiiisssskkkk GGGGeeeeoooommmmeeeettttrrrryyyy    CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn
  669.       Geometry information describes the physical characteristics
  670.       about    the disk. Its has three    purposes:
  671.  
  672.       formatting
  673.            The geometry information    is written into    the boot
  674.            sector of the newly made    disk. However, you may also
  675.            describe    the geometry information on the    command    line.
  676.            See section mformat for details.
  677.  
  678.       filtering
  679.            On some Unices there are    device nodes which only
  680.            support one physical geometry. For instance, you    might
  681.            need a different    node to    access a disk as high density
  682.            or as low density. The geometry is compared to the
  683.            actual geometry stored on the boot sector to make sure
  684.            that this device    node is    able to    correctly read the
  685.            disk. If    the geometry doesn't match, this drive entry
  686.            fails, and the next drive entry bearing the same    drive
  687.            letter is tried.    See section multiple descriptions for
  688.            more details on supplying several descriptions for one
  689.            drive letter.
  690.  
  691.            If no geometry information is supplied in the
  692.            configuration file, all disks are accepted. On Linux
  693.            (and on Sparc) there exist device nodes with
  694.            configurable geometry (`/dev/fd0', `/dev/fd1' etc), and
  695.            thus filtering is not needed (and ignored) for disk
  696.            drives.    (Mtools    still does do filtering    on plain files
  697.            (disk images) in    Linux: this is mainly intended for
  698.            test purposes, as I don't have access to    a Unix which
  699.            would actually need filtering).
  700.  
  701.            If you do not need filtering, but want still a default
  702.            geometry    for mformatting, you may switch    off filtering
  703.            using the mformat_only flag.
  704.  
  705.       initial geometry
  706.            On devices that support it (usually floppy devices),
  707.            the geometry information    is also    used to    set the
  708.            initial geometry. This initial geometry is applied
  709.            while reading the boot sector, which contains the real
  710.            geometry.  If no    geometry information is    supplied in
  711.            the configuration file, or if the mformat_only flag is
  712.            supplied, no initial configuration is done.
  713.  
  714.            On Linux, initial geometry is not really    needed,    as the
  715.            configurable devices are    able to    auto-detect the    disk
  716.            type accurately enough (for most    common formats)    to
  717.            read the    boot sector.
  718.  
  719.       Wrong    geometry information may lead to very bizarre errors.
  720.  
  721.  
  722.  
  723.      Page 11                         (printed 7/15/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  731.  
  732.  
  733.  
  734.       That's why I strongly    recommend that you add the
  735.       mformat_only flag to your drive description, unless you
  736.       really need filtering    or initial geometry.
  737.  
  738.       The following    geometry related variables are available:
  739.  
  740.       cylinders
  741.       tracks
  742.            The number of cylinders.    (cylinders is the preferred
  743.            form, tracks is considered obsolete)
  744.  
  745.       heads
  746.            The number of heads (sides).
  747.  
  748.       sectors
  749.            The number of sectors per track.
  750.  
  751.       Example: the following drive section describes a 1.44M
  752.       drive:
  753.  
  754.            ddddrrrriiiivvvveeee aaaa::::
  755.            ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH1111444444440000""""
  756.            ffffaaaatttt____bbbbiiiittttssss====11112222
  757.            ccccyyyylllliiiinnnnddddeeeerrrrssss====88880000    hhhheeeeaaaaddddssss====2222    sssseeeeccccttttoooorrrrssss====11118888
  758.  
  759.  
  760.  
  761.       The following    shorthand geometry descriptions    are available:
  762.  
  763.       1.44m
  764.            high density 3 1/2 disk.    Equivalent to:    fat_bits=12
  765.            cylinders=80 heads=2 sectors=18
  766.  
  767.       1.2m
  768.            high density 5 1/4 disk.    Equivalent to:    fat_bits=12
  769.            cylinders=80 heads=2 sectors=15
  770.  
  771.       720k
  772.            double density 3    1/2 disk. Equivalent to:  fat_bits=12
  773.            cylinders=80 heads=2 sectors=9
  774.  
  775.       360k
  776.            double density 5    1/4 disk. Equivalent to:  fat_bits=12
  777.            cylinders=40 heads=2 sectors=9
  778.  
  779.       The shorthand    format descriptions may    be amended. For
  780.       example, 360k    sectors=8 describes a 320k disk    and is
  781.       equivalent to:  fat_bits=12 cylinders=40 heads=2 sectors=8
  782.  
  783.       OOOOppppeeeennnn FFFFllllaaaaggggssss
  784.       Moreover, the    following flags    are available:
  785.  
  786.  
  787.  
  788.  
  789.      Page 12                         (printed 7/15/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  797.  
  798.  
  799.  
  800.       sync
  801.            All i/o operations are done synchronously
  802.  
  803.       nodelay
  804.            The device or file is opened with the O_NDELAY flag.
  805.            This is needed on some non-Linux    architectures.
  806.  
  807.       exclusive
  808.            The device or file is opened with the O_EXCL flag. On
  809.            Linux, this ensures exclusive access to the floppy
  810.            drive. On most other architectures, and for plain files
  811.            it has no effect    at all.
  812.  
  813.     GGGGeeeennnneeeerrrraaaallll    PPPPuuuurrrrppppoooosssseeee    DDDDrrrriiiivvvveeee VVVVaaaarrrriiiiaaaabbbblllleeeessss
  814.       The following    general    purpose    drive variables    are available.
  815.       Depending to their type, these variables can be set to a
  816.       string (file,    precmd)    or an integer (all others)
  817.  
  818.       file
  819.            The name    of the file or device holding the disk image.
  820.            This is mandatory. The file name    should be enclosed in
  821.            quotes.
  822.  
  823.       partition
  824.            Tells mtools to treat the drive as a partitioned
  825.            device, and to use the given partition. Only primary
  826.            partitions are accessible using this method, and    they
  827.            are numbered from 1 to 4. For logical partitions, use
  828.            the more    general    offset variable. The partition
  829.            variable    is intended for    removable media    such as
  830.            Syquests, ZIP drives, and magneto-optical disks.
  831.            Although    traditional DOS    sees Syquests and magneto-
  832.            optical disks as    `giant floppy disks' which are
  833.            unpartitioned, OS/2 and Windows NT treat    them like hard
  834.            disks, i.e. partioned devices. The partition flag is
  835.            also useful DOSEMU hdimages. It is not recommended for
  836.            hard disks for which direct access to partitions    is
  837.            available through mounting.
  838.  
  839.       offset
  840.            Describes where in the file the MS-DOS filesystem
  841.            starts. This is useful for logical partitions in    DOSEMU
  842.            hdimages, and for ATARI ram disks. By default, this is
  843.            zero, meaning that the filesystem starts    right at the
  844.            beginning of the    device or file.
  845.  
  846.       fat_bits
  847.            The number of FAT bits. This may    be 12 or 16. This is
  848.            very rarely needed, as it can almost always be deduced
  849.            from information    in the boot sector. On the contrary,
  850.            describing the number of    fat bits may actually be
  851.            harmful if you get it wrong. You    should only use    it if
  852.  
  853.  
  854.  
  855.      Page 13                         (printed 7/15/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  863.  
  864.  
  865.  
  866.            mtools gets the autodetected number of fat bits wrong,
  867.            or if you want to mformat a disk    with a weird number of
  868.            fat bits.
  869.  
  870.       precmd
  871.  
  872.            On some variants    of Solaris, it is necessary to call
  873.            'volcheck -v' before opening a floppy device, in    order
  874.            for the system to notice    that there is indeed a disk in
  875.            the drive. precmd="volcheck -v" in the drive clause
  876.            establishes the desired behavior.
  877.  
  878.       blocksize
  879.  
  880.            This parameter represents a default block size to be
  881.            always used on this device.  All    I/O is done with
  882.            multiples of this block size, independantly of the
  883.            sector size registered in the filesystem's boot sector.
  884.            This is useful for character devices whose sector size
  885.            is not 512, such    as for example CD Rom drives on
  886.            Solaris.
  887.  
  888.       Only the file    variable is mandatory. The other parameters
  889.       may be left out. In that case    a default value    or an
  890.       autodetected value is    used.
  891.  
  892.     GGGGeeeennnneeeerrrraaaallll    PPPPuuuurrrrppppoooosssseeee    DDDDrrrriiiivvvveeee FFFFllllaaaaggggssss
  893.       A flag can either be set to 1    (enabled) or 0 (disabled). If
  894.       the value is ommitted, it is enabled.     For example, scsi is
  895.       equivalent to    scsi=1
  896.  
  897.       nolock
  898.            Instruct    mtools to not use locking on this drive.  This
  899.            is needed on systems with buggy locking semantics.
  900.            However,    enabling this makes operation less safe    in
  901.            cases where several users may access the    same drive at
  902.            the same    time.
  903.  
  904.       scsi
  905.            When set    to 1, this option tells    mtools to use raw SCSI
  906.            I/O instead of the standard read/write calls to access
  907.            the device. Currently, this is supported    on HP/UX,
  908.            Solaris and SunOs.  This    is needed because on some
  909.            architectures, such as SunOs or Solaris,    PC media can't
  910.            be accessed using the read and write syscalls, because
  911.            the OS expects them to contain a    Sun specific "disk
  912.            label".
  913.  
  914.            As raw Scsi access always uses the whole    device,    you
  915.            need to specify the "partition" flag in addition
  916.  
  917.            On some architectures, such as Solaris, mtools needs
  918.  
  919.  
  920.  
  921.      Page 14                         (printed 7/15/98)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  929.  
  930.  
  931.  
  932.            root privileges to be able to use the scsi option.
  933.            Thus mtools should be installed set uid root on Solaris
  934.            if you want to access Zip/Jaz drives.  Thus, if the
  935.            scsi flag is given, privileged is automatically
  936.            implied,    unless explicitly disabled by privileged=0
  937.  
  938.            Mtools uses its root privileges to open the device, and
  939.            to issue    the actual SCSI    I/O calls.  Moreover, root
  940.            privileges are only used    for drives described in    a
  941.            system-wide configuration file such as
  942.            `/usr/freeware/etc/mtools.conf',    and not    for those
  943.            described in `~/.mtoolsrc' or `$MTOOLSRC'.
  944.  
  945.       privileged
  946.            When set    to 1, this instructs mtools to use its set-uid
  947.            and set-gid privileges for opening the given drive.
  948.            This option is only valid for drives described in the
  949.            system-wide configuration files (such as
  950.            `/usr/freeware/etc/mtools.conf',    not `~/.mtoolsrc' or
  951.            `$MTOOLSRC').  Obviously, this option is    also a no op
  952.            if mtools is not    installed setuid or setgid.  This
  953.            option is implied by 'scsi=1', but again    only for
  954.            drives defined in system-wide configuration files.
  955.            Privileged may also be set explicitely to 0, in order
  956.            to tell mtools not to use its privileges    for a given
  957.            drive even if scsi=1 is set.
  958.  
  959.            Mtools only needs to be installed setuid    if you use the
  960.            privileged or scsi drive    variables.  If you do not use
  961.            these options, mtools works perfectly well even when
  962.            not installed setuid root.
  963.  
  964.       vold
  965.  
  966.            Instructs mtools    to interpret the device    name as    a vold
  967.            identifier rather than as a filename.  The vold
  968.            identifier is translated    into a real filename using the
  969.            media_findname()    and media_oldaliases() functions of
  970.            the volmgt library.  This flag is only available    if you
  971.            configured mtools with the --enable-new-vold option
  972.            before compilation.
  973.  
  974.       use_xdf
  975.            If this is set to a non-zero value, mtools also tries
  976.            to access this disk as an XDF disk. XDF is a high
  977.            capacity    format used by OS/2. This is off by default.
  978.            See section XDF for more    details.
  979.  
  980.       mformat_only
  981.            Tells mtools to use the geometry    for this drive only
  982.            for mformatting and not for filtering.
  983.  
  984.  
  985.  
  986.  
  987.      Page 15                         (printed 7/15/98)
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  995.  
  996.  
  997.  
  998.       remote
  999.            Tells mtools to connect to floppyd (See section
  1000.            floppyd).
  1001.  
  1002.       SSSSuuuuppppppppllllyyyyiiiinnnngggg mmmmuuuullllttttiiiipppplllleeee ddddeeeessssccccrrrriiiippppttttiiiioooonnnnssss ffffoooorrrr aaaa    ddddrrrriiiivvvveeee
  1003.       It is    possible to supply multiple descriptions for a drive.
  1004.       In that case,    the descriptions are tried in order until one
  1005.       is found that    fits. Descriptions may fail for    several
  1006.       reasons:
  1007.  
  1008.       1.   because the geometry is not appropriate,
  1009.  
  1010.       2.   because there is    no disk    in the drive,
  1011.  
  1012.       3.   or because of other problems.
  1013.  
  1014.       Multiple definitions are useful when using physical devices
  1015.       which    are only able to support one single disk geometry.
  1016.       Example:
  1017.  
  1018.            ddddrrrriiiivvvveeee aaaa::::    ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH1111444444440000"""" 1111....44444444mmmm
  1019.            ddddrrrriiiivvvveeee aaaa::::    ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000HHHH777722220000"""" 777722220000kkkk
  1020.  
  1021.  
  1022.  
  1023.       This instructs mtools    to use /dev/fd0H1440 for 1.44m (high
  1024.       density) disks and /dev/fd0H720 for 720k (double density)
  1025.       disks. On Linux, this    feature    is not really needed, as the
  1026.       /dev/fd0 device is able to handle any    geometry.
  1027.  
  1028.       You may also use multiple drive descriptions to access both
  1029.       of your physical drives through one drive letter:
  1030.  
  1031.            ddddrrrriiiivvvveeee zzzz::::    ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd0000""""
  1032.            ddddrrrriiiivvvveeee zzzz::::    ffffiiiilllleeee====""""////ddddeeeevvvv////ffffdddd1111""""
  1033.  
  1034.  
  1035.  
  1036.       With this description, mdir z: accesses your first physical
  1037.       drive    if it contains a disk. If the first drive doesn't
  1038.       contain a disk, mtools checks    the second drive.
  1039.  
  1040.       When using multiple configuration files, drive descriptions
  1041.       in the files parsed last override descriptions for the same
  1042.       drive    in earlier files. In order to avoid this, use the
  1043.       drive+ or +drive keywords instead of drive. The first    adds a
  1044.       description to the end of the    list (i.e. it will be tried
  1045.       last), and the first adds it to the start of the list.
  1046.  
  1047.     CCCChhhhaaaarrrraaaacccctttteeeerrrr sssseeeetttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn ttttaaaabbbblllleeeessss
  1048.       If you live in the USA, in Western Europe or in Australia,
  1049.       you may skip this section.
  1050.  
  1051.  
  1052.  
  1053.      Page 16                         (printed 7/15/98)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1061.  
  1062.  
  1063.  
  1064.       WWWWhhhhyyyy cccchhhhaaaarrrraaaacccctttteeeerrrr    sssseeeetttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn    ttttaaaabbbblllleeeessss aaaarrrreeee nnnneeeeeeeeddddeeeedddd
  1065.       DOS uses a different character code mapping than Unix. 7-bit
  1066.       characters still have    the same meaning, only characters with
  1067.       the eight bit    set are    affected. To make matters worse, there
  1068.       are several translation tables available depending on    the
  1069.       country where    you are. The appearance    of the characters is
  1070.       defined using    code pages. These code pages aren't the    same
  1071.       for all countries. For instance, some    code pages don't
  1072.       contain upper    case accented characters. On the other hand,
  1073.       some code pages contain characters which don't exist in
  1074.       Unix,    such as    certain    line-drawing characters    or accented
  1075.       consonants used by some Eastern European countries. This
  1076.       affects two things, relating to filenames:
  1077.  
  1078.       upper    case characters
  1079.            In short    names, only upper case characters are allowed.
  1080.            This also holds for accented characters.    For instance,
  1081.            in a code page which doesn't contain accented uppercase
  1082.            characters, the accented    lowercase characters get
  1083.            transformed into    their unaccented counterparts.
  1084.  
  1085.       long file names
  1086.            Micro$oft has finally come to their senses and uses a
  1087.            more standard mapping for the long file names. They use
  1088.            Unicode,    which is basically a 32    bit version of ASCII.
  1089.            Its first 256 characters    are identical to Unix ASCII.
  1090.            Thus, the code page also    affects    the correspondence
  1091.            between the codes used in long names and    those used in
  1092.            short names
  1093.  
  1094.       Mtools considers the filenames entered on the    command    line
  1095.       as having the    Unix mapping, and translates the characters to
  1096.       get short names.  By default,    code page 850 is used with the
  1097.       Swiss    uppercase/lowercase mapping. I chose this code page,
  1098.       because its set of existing characters most closely matches
  1099.       Unix's. Moreover, this code page covers most characters in
  1100.       use in the USA, Australia and    Western    Europe.    However, it is
  1101.       still    possible to chose a different mapping. There are two
  1102.       methods:  the    country    variable and explicit tables.
  1103.  
  1104.       CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn    uuuussssiiiinnnngggg CCCCoooouuuunnnnttttrrrryyyy
  1105.       The COUNTRY variable is recommended for people which also
  1106.       have access to MS-DOS    system files and documentation.    If you
  1107.       don't    have access to these, I'd suggest you'd    rather use
  1108.       explicit tables instead.
  1109.  
  1110.       Syntax:
  1111.  
  1112.       COUNTRY="_c_o_u_n_t_r_y[,[_c_o_d_e_p_a_g_e],    _c_o_u_n_t_r_y-_f_i_l_e]"
  1113.  
  1114.       This tells mtools to use a Unix-to-DOS translation table
  1115.       which    matches    _c_o_d_e_p_a_g_e and an    lowercase-to-uppercase table
  1116.  
  1117.  
  1118.  
  1119.      Page 17                         (printed 7/15/98)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1127.  
  1128.  
  1129.  
  1130.       for _c_o_u_n_t_r_y and to use the _c_o_u_n_t_r_y-_f_i_l_e file to get the
  1131.       lowercase-to-uppercase table.    The country code is most often
  1132.       the telephone    prefix of the country. Refer to    the DOS    help
  1133.       page on "country" for    more details. The _c_o_d_e_p_a_g_e and the
  1134.       _c_o_u_n_t_r_y-_f_i_l_e parameters are optional.    Please don't type in
  1135.       the square brackets, they are    only there to say which
  1136.       parameters are optional. The _c_o_u_n_t_r_y-_f_i_l_e file is supplied
  1137.       with MS-DOS, and is usually called `COUNTRY.SYS', and    stored
  1138.       in the `C:\DOS' directory. In    most cases you don't need it,
  1139.       as the most common translation tables    are compiled into
  1140.       mtools. So, don't worry if you run a Unix-only box which
  1141.       lacks    this file.
  1142.  
  1143.       If _c_o_d_e_p_a_g_e is not given, a per country default code page is
  1144.       used.    If the _c_o_u_n_t_r_y-_f_i_l_e parameter isn't given, compiled-in
  1145.       defaults are used for    the lowercase-to-uppercase table. This
  1146.       is useful for    other Unices than Linux, which may have    no
  1147.       `COUNTRY.SYS'    file available online.
  1148.  
  1149.       The Unix-to-DOS are not contained in the `COUNTRY.SYS' file,
  1150.       and thus mtools always uses compiled-in defaults for those.
  1151.       Thus,    only a limited amount of code pages are    supported. If
  1152.       your preferred code page is missing, or if you know the name
  1153.       of the Windows 95 file which contains    this mapping, could
  1154.       you please drop me a line at alain@linux.lu.
  1155.  
  1156.       The COUNTRY variable can also    be set using the environment.
  1157.  
  1158.       CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn    uuuussssiiiinnnngggg eeeexxxxpppplllliiiicccciiiitttt ttttrrrraaaannnnssssllllaaaattttiiiioooonnnn ttttaaaabbbblllleeeessss
  1159.       Translation tables may be described in line in the
  1160.       configuration    file. Two tables are needed: first the DOS-
  1161.       to-Unix table, and then the Lowercase-to-Uppercase table. A
  1162.       DOS-to-Unix table starts with    the tounix keyword, followed
  1163.       by a colon, and 128 hexadecimal numbers.  A lower-to-upper
  1164.       table    starts with the    fucase keyword,    followed by a colon,
  1165.       and 128 hexadecimal numbers.
  1166.  
  1167.       The tables only show the translations    for characters whose
  1168.       codes    is greater than    128, because translation for lower
  1169.       codes    is trivial.
  1170.  
  1171.       Example:
  1172.  
  1173.           ttttoooouuuunnnniiiixxxx::::
  1174.         0000xxxxcccc7777 0000xxxxffffcccc 0000xxxxeeee9999 0000xxxxeeee2222 0000xxxxeeee4444 0000xxxxeeee0000 0000xxxxeeee5555 0000xxxxeeee7777
  1175.         0000xxxxeeeeaaaa 0000xxxxeeeebbbb 0000xxxxeeee8888 0000xxxxeeeeffff 0000xxxxeeeeeeee 0000xxxxeeeecccc 0000xxxxcccc4444 0000xxxxcccc5555
  1176.         0000xxxxcccc9999 0000xxxxeeee6666 0000xxxxcccc6666 0000xxxxffff4444 0000xxxxffff6666 0000xxxxffff2222 0000xxxxffffbbbb 0000xxxxffff9999
  1177.         0000xxxxffffffff 0000xxxxdddd6666 0000xxxxddddcccc 0000xxxxffff8888 0000xxxxaaaa3333 0000xxxxdddd8888 0000xxxxdddd7777 0000xxxx5555ffff
  1178.         0000xxxxeeee1111 0000xxxxeeeedddd 0000xxxxffff3333 0000xxxxffffaaaa 0000xxxxffff1111 0000xxxxdddd1111 0000xxxxaaaaaaaa 0000xxxxbbbbaaaa
  1179.         0000xxxxbbbbffff 0000xxxxaaaaeeee 0000xxxxaaaacccc 0000xxxxbbbbdddd 0000xxxxbbbbcccc 0000xxxxaaaa1111 0000xxxxaaaabbbb 0000xxxxbbbbbbbb
  1180.         0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxcccc1111 0000xxxxcccc2222 0000xxxxcccc0000
  1181.         0000xxxxaaaa9999 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxaaaa2222 0000xxxxaaaa5555 0000xxxxaaaacccc
  1182.  
  1183.  
  1184.  
  1185.      Page 18                         (printed 7/15/98)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1193.  
  1194.  
  1195.  
  1196.         0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxeeee3333 0000xxxxcccc3333
  1197.         0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxxaaaa4444
  1198.         0000xxxxffff0000 0000xxxxdddd0000 0000xxxxcccc9999 0000xxxxccccbbbb 0000xxxxcccc8888 0000xxxx66669999 0000xxxxccccdddd 0000xxxxcccceeee
  1199.         0000xxxxccccffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx5555ffff 0000xxxx7777cccc 0000xxxx44449999 0000xxxx5555ffff
  1200.         0000xxxxdddd3333 0000xxxxddddffff 0000xxxxdddd4444 0000xxxxdddd2222 0000xxxxffff5555 0000xxxxdddd5555 0000xxxxbbbb5555 0000xxxxffffeeee
  1201.         0000xxxxddddeeee 0000xxxxddddaaaa 0000xxxxdddd9999 0000xxxxffffdddd 0000xxxxdddddddd 0000xxxxddddeeee 0000xxxxaaaaffff 0000xxxxbbbb4444
  1202.         0000xxxxaaaadddd 0000xxxxbbbb1111 0000xxxx5555ffff 0000xxxxbbbbeeee 0000xxxxbbbb6666 0000xxxxaaaa7777 0000xxxxffff7777 0000xxxxbbbb8888
  1203.         0000xxxxbbbb0000 0000xxxxaaaa8888 0000xxxxbbbb7777 0000xxxxbbbb9999 0000xxxxbbbb3333 0000xxxxbbbb2222 0000xxxx5555ffff 0000xxxx5555ffff
  1204.  
  1205.           ffffuuuuccccaaaasssseeee::::
  1206.         0000xxxx88880000 0000xxxx9999aaaa 0000xxxx99990000 0000xxxxbbbb6666 0000xxxx8888eeee 0000xxxxbbbb7777 0000xxxx8888ffff 0000xxxx88880000
  1207.         0000xxxxdddd2222 0000xxxxdddd3333 0000xxxxdddd4444 0000xxxxdddd8888 0000xxxxdddd7777 0000xxxxddddeeee 0000xxxx8888eeee 0000xxxx8888ffff
  1208.         0000xxxx99990000 0000xxxx99992222 0000xxxx99992222 0000xxxxeeee2222 0000xxxx99999999 0000xxxxeeee3333 0000xxxxeeeeaaaa 0000xxxxeeeebbbb
  1209.         0000xxxx55559999 0000xxxx99999999 0000xxxx9999aaaa 0000xxxx9999dddd 0000xxxx9999cccc 0000xxxx9999dddd 0000xxxx9999eeee 0000xxxx9999ffff
  1210.         0000xxxxbbbb5555 0000xxxxdddd6666 0000xxxxeeee0000 0000xxxxeeee9999 0000xxxxaaaa5555 0000xxxxaaaa5555 0000xxxxaaaa6666 0000xxxxaaaa7777
  1211.         0000xxxxaaaa8888 0000xxxxaaaa9999 0000xxxxaaaaaaaa 0000xxxxaaaabbbb 0000xxxxaaaacccc 0000xxxxaaaadddd 0000xxxxaaaaeeee 0000xxxxaaaaffff
  1212.         0000xxxxbbbb0000 0000xxxxbbbb1111 0000xxxxbbbb2222 0000xxxxbbbb3333 0000xxxxbbbb4444 0000xxxxbbbb5555 0000xxxxbbbb6666 0000xxxxbbbb7777
  1213.         0000xxxxbbbb8888 0000xxxxbbbb9999 0000xxxxbbbbaaaa 0000xxxxbbbbbbbb 0000xxxxbbbbcccc 0000xxxxbbbbdddd 0000xxxxbbbbeeee 0000xxxxbbbbffff
  1214.         0000xxxxcccc0000 0000xxxxcccc1111 0000xxxxcccc2222 0000xxxxcccc3333 0000xxxxcccc4444 0000xxxxcccc5555 0000xxxxcccc7777 0000xxxxcccc7777
  1215.         0000xxxxcccc8888 0000xxxxcccc9999 0000xxxxccccaaaa 0000xxxxccccbbbb 0000xxxxcccccccc 0000xxxxccccdddd 0000xxxxcccceeee 0000xxxxccccffff
  1216.         0000xxxxdddd1111 0000xxxxdddd1111 0000xxxxdddd2222 0000xxxxdddd3333 0000xxxxdddd4444 0000xxxx44449999 0000xxxxdddd6666 0000xxxxdddd7777
  1217.         0000xxxxdddd8888 0000xxxxdddd9999 0000xxxxddddaaaa 0000xxxxddddbbbb 0000xxxxddddcccc 0000xxxxdddddddd 0000xxxxddddeeee 0000xxxxddddffff
  1218.         0000xxxxeeee0000 0000xxxxeeee1111 0000xxxxeeee2222 0000xxxxeeee3333 0000xxxxeeee5555 0000xxxxeeee5555 0000xxxxeeee6666 0000xxxxeeee8888
  1219.         0000xxxxeeee8888 0000xxxxeeee9999 0000xxxxeeeeaaaa 0000xxxxeeeebbbb 0000xxxxeeeedddd 0000xxxxeeeedddd 0000xxxxeeeeeeee 0000xxxxeeeeffff
  1220.         0000xxxxffff0000 0000xxxxffff1111 0000xxxxffff2222 0000xxxxffff3333 0000xxxxffff4444 0000xxxxffff5555 0000xxxxffff6666 0000xxxxffff7777
  1221.         0000xxxxffff8888 0000xxxxffff9999 0000xxxxffffaaaa 0000xxxxffffbbbb 0000xxxxffffcccc 0000xxxxffffdddd 0000xxxxffffeeee 0000xxxxffffffff
  1222.  
  1223.  
  1224.  
  1225.       The first table maps DOS character codes to Unix character
  1226.       codes. For example, the DOS character    number 129. This is a
  1227.       u with to dots on top    of it. To translate it into Unix, we
  1228.       look at the character    number 1 in the    first table (1 = 129 -
  1229.       128).    This is    0xfc. (Beware, numbering starts    at 0).    The
  1230.       second table maps lower case DOS characters to upper case
  1231.       DOS characters. The same lower case u    with dots maps to
  1232.       character 0x9a, which    is an uppercase    U with dots in DOS.
  1233.  
  1234.       UUUUnnnniiiiccccooooddddeeee cccchhhhaaaarrrraaaacccctttteeeerrrrssss ggggrrrreeeeaaaatttteeeerrrr tttthhhhaaaannnn 222255556666
  1235.       If an    existing MS-DOS    name contains Unicode character
  1236.       greater than 256, these are translated to underscores    or to
  1237.       characters which are close in    visual appearance. For
  1238.       example, accented consonants are translated into their
  1239.       unaccented counterparts. This    translation is used for    mdir
  1240.       and for the Unix filenames generated by mcopy. Linux does
  1241.       support Unicode too, but unfortunately too few applications
  1242.       support it yet to bother with    it in mtools. Most
  1243.       importantly, xterm can't display Unicode yet.    If there is
  1244.       sufficient demand, I might include support for Unicode in
  1245.       the Unix filenames as    well.
  1246.  
  1247.       CCCCaaaauuuuttttiiiioooonnnn::::  When deleting files    with mtools, the underscore
  1248.  
  1249.  
  1250.  
  1251.      Page 19                         (printed 7/15/98)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1259.  
  1260.  
  1261.  
  1262.       matches all characters which can't be    represented in Unix.
  1263.       Be careful with mdel!
  1264.  
  1265.     LLLLooooccccaaaattttiiiioooonnnn ooooffff ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeeessss    aaaannnndddd ppppaaaarrrrssssiiiinnnngggg oooorrrrddddeeeerrrr
  1266.       The configuration files are parsed in    the following order:
  1267.  
  1268.       1.   compiled-in defaults
  1269.  
  1270.       2.   `/usr/freeware/etc/mtools.conf'
  1271.  
  1272.       3.   `/etc/mtools' This is for backwards compatibility only,
  1273.            and is only parsed if `mtools.conf' doesn't exist.
  1274.  
  1275.       4.   `~/.mtoolsrc'.
  1276.  
  1277.       5.   `$MTOOLSRC' (file pointed by the    MTOOLSRC environmental
  1278.            variable)
  1279.  
  1280.       Options described in the later files override    those
  1281.       described in the earlier files. Drives defined in earlier
  1282.       files    persist    if they    are not    overridden in the later    files.
  1283.       For instance,    drives A and B may be defined in
  1284.       `/usr/freeware/etc/mtools.conf' and drives C and D may be
  1285.       defined in `~/.mtoolsrc' However, if `~/.mtoolsrc' also
  1286.       defines drive    A, this    new description    would override the
  1287.       description of drive A in `/usr/freeware/etc/mtools.conf'
  1288.       instead of adding to it. If you want to add a    new
  1289.       description to a drive already described in an earlier file,
  1290.       you need to use either the +drive or drive+ keyword.
  1291.  
  1292.     BBBBaaaacccckkkkwwwwaaaarrrrddddssss ccccoooommmmppppaaaattttiiiibbbbiiiilllliiiittttyyyy    wwwwiiiitttthhhh oooolllldddd ccccoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnn ffffiiiilllleeee ssssyyyynnnnttttaaaaxxxx
  1293.       The syntax described herein is new for version mtools-3.0.
  1294.       The old line-oriented    syntax is still    supported. Each    line
  1295.       beginning with a single letter is considered to be a drive
  1296.       description using the    old syntax. Old    style and new style
  1297.       drive    sections may be    mixed within the same configuration
  1298.       file,    in order to make upgrading easier. Support for the old
  1299.       syntax will be phased    out eventually,    and in order to
  1300.       discourage its use, I    purposefully omit its description
  1301.       here.
  1302.  
  1303.      CCCCoooommmmmmmmaaaannnndddd lllliiiisssstttt
  1304.        This    section    describes the available    mtools commands, and
  1305.       the command line parameters that each    of them    accepts.
  1306.       Options which    are common to all mtools commands are not
  1307.       described here, `arguments' for a description    of those.
  1308.  
  1309.     FFFFllllooooppppppppyyyydddd
  1310.       Floppyd is used as a server to grant access to the floppy
  1311.       drive    to clients running on a    remote machine,    just as    an X
  1312.       server grants    access to the display to remote    clients.  It
  1313.       has the following syntax:
  1314.  
  1315.  
  1316.  
  1317.      Page 20                         (printed 7/15/98)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1325.  
  1326.  
  1327.  
  1328.       floppyd [-d] [-l] [-s    _p_o_r_t] [-r _u_s_e_r]    [-b _i_p_a_d_d_r] _d_e_v_i_c_e_n_a_m_e
  1329.       [_d_i_s_p_l_a_y_n_a_m_e_s]
  1330.  
  1331.       floppyd is always associated with an X server.  It runs on
  1332.       the same machine as its X server, and    listens    on port    5703
  1333.       and above.
  1334.  
  1335.       AAAAuuuutttthhhheeeennnnttttiiiiccccaaaattttiiiioooonnnn
  1336.       floppyd authenticates    remote clients using the Xauthority
  1337.       protocol. Xhost authentication is not    supported. Each
  1338.       floppyd is associated    with an    X server.  When    a remote
  1339.       client attempts to connect to    floppyd, it sends floppyd the
  1340.       X authority record corresponding to floppyd's    X server.
  1341.       Floppyd in turn then tries to    open up    a connection to    the X
  1342.       server in order to verify the    authenticity of    the xauth
  1343.       record.  If the connection to    the X server succeeds, the
  1344.       client is granted access
  1345.  
  1346.       CCCCaaaauuuuttttiiiioooonnnn: In order to make authentication work    correctly, the
  1347.       local    host should nnnnooootttt    be listed in the xhost list of allowed
  1348.       hosts.
  1349.        Indeed, hosts listed    in xhost do not    need a correct
  1350.       Xauthority cookie to connect to the X    server.    As floppyd
  1351.       runs on the same host    as the X server, all its probe
  1352.       connection would succeed even    for clients who    supplied a bad
  1353.       cookie.  This    means that your    floppy drive would be open to
  1354.       the world, i.e. a huge security hole.
  1355.        If your X server does not allow you to remove localhost:0
  1356.       and :0 from the xhost    list, you can prevent floppyd from
  1357.       probing those    display    names with the -l option.
  1358.  
  1359.       CCCCoooommmmmmmmaaaannnndddd lllliiiinnnneeee ooooppppttttiiiioooonnnnssss
  1360.       d    Daemon mode. Floppyd runs its own server    loop.  Do not
  1361.            supply this if you start    floppyd    from inetd.conf
  1362.  
  1363.       s  _p_o_r_t
  1364.            Port number for deamon mode.  Default is    5703 +
  1365.            _d_i_s_p_l_a_y_n_u_m_b_e_r.  This flag implies daemon    mode.  For
  1366.            example,    for display hitchhiker:5, the port would be
  1367.            5708.
  1368.  
  1369.       b  _i_p_a_d_d_r
  1370.            Bind address (for multihomed hosts). This flag implies
  1371.            daemon mode
  1372.  
  1373.       r _u_s_e_r
  1374.            Run the server under as the given user
  1375.  
  1376.       l    Do not generate local default display names
  1377.  
  1378.       _d_e_v_i_c_e_n_a_m_e is    the name of the    device node to be opened.
  1379.       Default is /dev/fd0.
  1380.  
  1381.  
  1382.  
  1383.      Page 21                         (printed 7/15/98)
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1391.  
  1392.  
  1393.  
  1394.       _d_i_s_p_l_a_y_n_a_m_e_s is a list of display names to connect to    for
  1395.       authentication.  All displays    in the list are    tried until
  1396.       one is found that grants access or until the list is
  1397.       exhausted.  If no list is supplied, the a display name list
  1398.       based    on the ip address supplied using the -b    flag is
  1399.       constructed: _i_p_a_d_d_r:_n.0.
  1400.  
  1401.       *  :_n.0
  1402.         If floppyd is started from inetd, the address of the
  1403.            socket used for stdin is    used as    a bind address.
  1404.  
  1405.        If no bind address is supplied, a list containing the
  1406.       following 3 items is constructed:
  1407.  
  1408.       *  _h_o_s_t_n_a_m_e:_n.0
  1409.  
  1410.       *  localhost:_n.0
  1411.  
  1412.       *  :_n.0
  1413.  
  1414.        _n is    the display number derived from    the port number    (_p_o_r_t
  1415.       - 5703 modulo    10). The local items (localhost:0 and :0) are
  1416.       not constructed if the -l flag is given.
  1417.  
  1418.       CCCCoooonnnnnnnneeeeccccttttiiiinnnngggg ttttoooo    ffffllllooooppppppppyyyydddd
  1419.        In order to use floppyd, add    the flag remote    to the device
  1420.       description in your `~/.mtoolsrc' file.  If the flag remote
  1421.       is given, the    file parameter of the device description is
  1422.       taken    to be a    remote address.     It's format is    the following:
  1423.       _h_o_s_t_n_a_m_e:_d_i_s_p_l_a_y_n_u_m_b_e_r[/_b_a_s_e_p_o_r_t]. When using    this entry,
  1424.       mtools connects to port _b_a_s_e_p_o_r_t+_d_i_s_p_l_a_y_n_u_m_b_e_r at _h_o_s_t_n_a_m_e.
  1425.       By default _b_a_s_e_p_o_r_t is 5703.
  1426.  
  1427.       EEEExxxxaaaammmmpppplllleeeessss::::
  1428.        The following starts    a floppy daemon    giving access to
  1429.       `/dev/fd0', listening    on the default port 5703, tied to the
  1430.       default X servers:
  1431.  
  1432.          ffffllllooooppppppppyyyydddd ----dddd    ////ddddeeeevvvv////ffffdddd0000
  1433.  
  1434.  
  1435.  
  1436.        Each    of the following starts    a floppy daemon    giving access
  1437.       to `/dev/fd1', tied to the :1    local X    servers, and listening
  1438.       on port 5704.    We assume that the local host is named
  1439.       hitchhiker.
  1440.  
  1441.          ffffllllooooppppppppyyyydddd ----dddd    ////ddddeeeevvvv////ffffdddd0000 llllooooccccaaaallllhhhhoooosssstttt::::1111 hhhhiiiittttcccchhhhhhhhiiiikkkkeeeerrrr::::1111 ::::1111
  1442.          ffffllllooooppppppppyyyydddd ----pppp    5555777700004444 ////ddddeeeevvvv////ffffdddd0000
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.      Page 22                         (printed 7/15/98)
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1457.  
  1458.  
  1459.  
  1460.        If you want to start    floppyd    by inetd instead of running it
  1461.       as a daemon, insert the following lines into
  1462.       `/etc/services':
  1463.  
  1464.          #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn
  1465.          ffffllllooooppppppppyyyydddd----0000      5555777700003333////ttttccccpppp    ####    ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn ffffoooorrrr XXXX sssseeeerrrrvvvveeeerrrr ::::0000
  1466.          ffffllllooooppppppppyyyydddd----1111      5555777700004444////ttttccccpppp    ####    ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn ffffoooorrrr XXXX sssseeeerrrrvvvveeeerrrr ::::1111
  1467.  
  1468.  
  1469.  
  1470.        And insert the following into `/etc/inetd.conf' (assuming
  1471.       that you have    defined    a user named floppy in your
  1472.       `/etc/passwd'):
  1473.  
  1474.          #### ffffllllooooppppppppyyyy ddddaaaaeeeemmmmoooonnnn
  1475.          ffffllllooooppppppppyyyydddd----0000     ssssttttrrrreeeeaaaammmm     ttttccccpppp  wwwwaaaaiiiitttt  ffffllllooooppppppppyyyy  ////uuuussssrrrr////ssssbbbbiiiinnnn////ffffllllooooppppppppyyyydddd ffffllllooooppppppppyyyydddd ////ddddeeeevvvv////ffffdddd0000
  1476.          ffffllllooooppppppppyyyydddd----1111     ssssttttrrrreeeeaaaammmm     ttttccccpppp  wwwwaaaaiiiitttt  ffffllllooooppppppppyyyy  ////uuuussssrrrr////ssssbbbbiiiinnnn////ffffllllooooppppppppyyyydddd ffffllllooooppppppppyyyydddd ////ddddeeeevvvv////ffffdddd1111
  1477.  
  1478.  
  1479.  
  1480.        Note    that you need to supply    the X display names for    the
  1481.       second floppyd.  This    is because the port is opened by
  1482.       inetd.conf, and hence    floppyd    cannot know its    number to
  1483.       interfere the    display    number.
  1484.  
  1485.        On the client side, insert the following into your
  1486.       `~/.mtoolsrc'    to define a drive letter accessing floppy
  1487.       drive    in your    X terminal:
  1488.  
  1489.          ddddrrrriiiivvvveeee xxxx:::: ffffiiiilllleeee====""""$$$$DDDDIIIISSSSPPPPLLLLAAAAYYYY"""" rrrreeeemmmmooootttteeee
  1490.  
  1491.  
  1492.  
  1493.     MMMMaaaattttttttrrrriiiibbbb
  1494.       Mattrib is used to change MS-DOS file    attribute flags. It
  1495.       has the following syntax:
  1496.  
  1497.       mattrib [-a|+a] [-h|+h] [-r|+r] [-s|+s] [-/]    [-X] _m_s_d_o_s_f_i_l_e
  1498.       [ _m_s_d_o_s_f_i_l_e_s ... ]
  1499.  
  1500.       Mattrib adds attribute flags to an MS-DOS file (with the `+'
  1501.       operator) or remove attribute    flags (with the    `-' operator).
  1502.  
  1503.       Mattrib supports the following attribute bits:
  1504.  
  1505.       a    Archive bit.  Used by some backup programs to indicate
  1506.            a new file.
  1507.  
  1508.       r    Read-only bit.  Used to indicate    a read-only file.
  1509.            Files with this bit set cannot be erased    by DEL nor
  1510.            modified.
  1511.  
  1512.  
  1513.  
  1514.  
  1515.      Page 23                         (printed 7/15/98)
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1523.  
  1524.  
  1525.  
  1526.       s    System bit.  Used by MS-DOS to indicate a operating
  1527.            system file.
  1528.  
  1529.       h    Hidden bit.  Used to make files hidden from DIR.
  1530.  
  1531.       Mattrib supports the following command line flags:
  1532.  
  1533.       /    Recursive.  Recursively list the    attributes of the
  1534.            files in    the subdirectories.
  1535.  
  1536.       X    Concise.    Prints the attributes whithout any whitespace
  1537.            padding.     This is convenient for    script.     If neither
  1538.            the "/" option is given,    nor the    _m_s_d_o_s_f_i_l_e contains a
  1539.            wildcard, and there is only one Msdos file parameter on
  1540.            the command line, only the attribute is printed,    and
  1541.            not the filename.  This option is convenient for
  1542.            scripts
  1543.  
  1544.     MMMMbbbbaaaaddddbbbblllloooocccckkkkssss
  1545.       The mbadblocks command is used to scan an MS-DOS floppy and
  1546.       mark its unused bad blocks as    bad. It    uses the following
  1547.       syntax:
  1548.  
  1549.       mbadblocks _d_r_i_v_e:
  1550.  
  1551.       Mbadblocks scans an MS-DOS floppy for    bad blocks. All    unused
  1552.       bad blocks are marked    as such    in the FAT. This is intended
  1553.       to be    used right after mformat.  It is not intended to
  1554.       salvage bad disks.
  1555.  
  1556.       BBBBuuuuggggssss
  1557.       Mbadblocks should (but doesn't yet :-( ) also    try to salvage
  1558.       bad blocks which are in use by reading them repeatedly, and
  1559.       then mark them bad.
  1560.  
  1561.     MMMMccccdddd
  1562.       The mcd command is used to change the    mtools working
  1563.       directory on the MS-DOS disk.    It uses    the following syntax:
  1564.  
  1565.          mcd [_m_s_d_o_s_d_i_r_e_c_t_o_r_y]
  1566.  
  1567.  
  1568.  
  1569.       Without arguments, mcd reports the current device and
  1570.       working directory.  Otherwise, mcd changes the current
  1571.       device and current working directory relative    to an MS-DOS
  1572.       filesystem.
  1573.  
  1574.       The environmental variable MCWD may be used to locate    the
  1575.       file where the device    and current working directory
  1576.       information is stored.  The default is `$HOME/.mcwd'.
  1577.       Information in this file is ignored if the file is more than
  1578.  
  1579.  
  1580.  
  1581.      Page 24                         (printed 7/15/98)
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1589.  
  1590.  
  1591.  
  1592.       6 hours old.
  1593.  
  1594.       Mcd returns 0    on success or 1    on failure.
  1595.  
  1596.       Unlike MS-DOS    versions of CD,    mcd can    be used    to change to
  1597.       another device. It may be wise to remove old `.mcwd' files
  1598.       at logout.
  1599.  
  1600.     MMMMccccooooppppyyyy
  1601.       The mcopy command is used to copy MS-DOS files to and    from
  1602.       Unix.    It uses    the following syntax:
  1603.  
  1604.          mcopy [-b/ptnvmoQOsSrRA] _s_o_u_r_c_e_f_i_l_e _t_a_r_g_e_t_f_i_l_e
  1605.          mcopy [-b/ptnvmoQOsSrRA] _s_o_u_r_c_e_f_i_l_e [ _s_o_u_r_c_e_f_i_l_e_s... ] _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
  1606.          mcopy [-tnvm] _M_S_D_O_S_s_o_u_r_c_e_f_i_l_e
  1607.  
  1608.  
  1609.  
  1610.       Mcopy    copies the specified file to the named file, or    copies
  1611.       multiple files to the    named directory.  The source and
  1612.       target can be    either MS-DOS or Unix files.
  1613.  
  1614.       The use of a drive letter designation    on the MS-DOS files,
  1615.       'a:' for example, determines the direction of    the transfer.
  1616.       A missing drive designation implies a    Unix file whose    path
  1617.       starts in the    current    directory.  If a source    drive letter
  1618.       is specified with no attached    file name (e.g.    mcopy a: .),
  1619.       all files are    copied from that drive.
  1620.  
  1621.       If only a single, MS-DOS source parameter is provided    (e.g.
  1622.       "mcopy a:foo.exe"), an implied destination of    the current
  1623.       directory (`.') is assumed.
  1624.  
  1625.       A filename of    `-' means standard input or standard output,
  1626.       depending on its position on the command line.
  1627.  
  1628.       Mcopy    accepts    the following command line options:
  1629.  
  1630.       b    Batch mode. Optimized for huge recursive    copies,    but
  1631.            less secure if a    crash happens during the copy.
  1632.  
  1633.       /    Recursive copy.    Also copies directories    and their
  1634.            contents
  1635.  
  1636.       p    Preserves the attributes    of the copied files
  1637.  
  1638.       Q    When mcopying multiple files, quits as soon as one copy
  1639.            fails (for example due to lacking storage space on the
  1640.            target disk)
  1641.  
  1642.       t    Text file transfer.  Mcopy translates incoming carriage
  1643.            return/line feeds to line feeds.
  1644.  
  1645.  
  1646.  
  1647.      Page 25                         (printed 7/15/98)
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1655.  
  1656.  
  1657.  
  1658.       n    No confirmation when overwriting    Unix files.  Mcopy
  1659.            doesn't warn the    user when overwriting an existing Unix
  1660.            file.  In order to switch off confirmation for DOS
  1661.            files, use -o.
  1662.  
  1663.       m    Preserve    the file modification time. If the target file
  1664.            already exists, and the -n option is not    in effect,
  1665.            mcopy asks whether to overwrite the file    or to rename
  1666.            the new file (`name clashes') for details).
  1667.  
  1668.       BBBBuuuuggggssss
  1669.       Unlike MS-DOS, the '+' operator (append) from    MS-DOS is not
  1670.       supported. However, you may use mtype    to produce the same
  1671.       effect:
  1672.  
  1673.          mmmmttttyyyyppppeeee aaaa::::ffffiiiilllleeee1111 aaaa::::ffffiiiilllleeee2222 aaaa::::ffffiiiilllleeee3333 >>>>uuuunnnniiiixxxxffffiiiilllleeee
  1674.          mmmmttttyyyyppppeeee aaaa::::ffffiiiilllleeee1111 aaaa::::ffffiiiilllleeee2222 aaaa::::ffffiiiilllleeee3333 |||| mmmmccccooooppppyyyy ---- aaaa::::mmmmssssddddoooossssffffiiiilllleeee
  1675.  
  1676.  
  1677.  
  1678.     MMMMddddeeeellll
  1679.       The mdel command is used to delete an    MS-DOS file. Its
  1680.       syntax is:
  1681.  
  1682.       mdel [-v] _m_s_d_o_s_f_i_l_e [    _m_s_d_o_s_f_i_l_e_s ...    ]
  1683.  
  1684.  
  1685.       Mdel deletes files on    an MS-DOS filesystem.
  1686.  
  1687.       Mdel asks for    verification prior to removing a read-only
  1688.       file.
  1689.  
  1690.     MMMMddddeeeellllttttrrrreeeeeeee
  1691.       The mdeltree command is used to delete an MS-DOS file. Its
  1692.       syntax is:
  1693.  
  1694.       mdeltree [-v]    _m_s_d_o_s_d_i_r_e_c_t_o_r_y [_m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s...]
  1695.  
  1696.  
  1697.       Mdeltree removes a directory and all the files and
  1698.       subdirectories it contains from an MS-DOS filesystem.    An
  1699.       error    occurs if the directory    to be removed does not exist.
  1700.  
  1701.     MMMMddddiiiirrrr
  1702.       The mdir command is used to display an MS-DOS    directory. Its
  1703.       syntax is:
  1704.  
  1705.       mdir [-/] [-f] [-w] [-a] [-X]    _m_s_d_o_s_f_i_l_e [ _m_s_d_o_s_f_i_l_e_s...]
  1706.  
  1707.       Mdir displays    the contents of    MS-DOS directories, or the
  1708.       entries for some MS-DOS files.
  1709.  
  1710.  
  1711.  
  1712.  
  1713.      Page 26                         (printed 7/15/98)
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1721.  
  1722.  
  1723.  
  1724.       Mdir supports    the following command line options:
  1725.  
  1726.       /    Recursive output, just like Dos'    -s option
  1727.  
  1728.       w    Wide output.  With this option, mdir prints the
  1729.            filenames across    the page without displaying the    file
  1730.            size or creation    date.
  1731.  
  1732.       a    Also list hidden    files.
  1733.  
  1734.       f    Fast.  Do not try to find out free space.  On larger
  1735.            disks, finding out the amount of    free space takes up
  1736.            some non    trivial    amount of time,    as the whole FAT must
  1737.            be read in and scanned.    The -f flag bypasses this
  1738.            step.  This flag    is not needed on FAT32 filesystems,
  1739.            which store the size explicitely.
  1740.  
  1741.       X    Concise listing.     List only a newline separated list of
  1742.            pathnames without any decoration    nor additional
  1743.            information
  1744.  
  1745.       An error occurs if a component of the    path is    not a
  1746.       directory.
  1747.  
  1748.     MMMMdddduuuu
  1749.       Mdu is used to list the space    occupied by a directory, its
  1750.       subdirectories and its files.    It is similar to the du
  1751.       command on Unix.  The    unit used are clusters.     Use the minfo
  1752.       command to find out the cluster size.
  1753.  
  1754.       mdu [-a] [ _m_s_d_o_s_f_i_l_e_s    ... ]
  1755.  
  1756.       a    All files.  List    also the space occupied    for individual
  1757.            files.
  1758.  
  1759.       s    Only list the total space, don't    give details for each
  1760.            subdirectory.
  1761.  
  1762.     MMMMffffoooorrrrmmmmaaaatttt
  1763.       The mformat command is used to add an    MS-DOS filesystem to a
  1764.       low-level formatted diskette.    Its syntax is:
  1765.  
  1766.       mformat [-t _c_y_l_i_n_d_e_r_s] [-h _h_e_a_d_s] [-s    _s_e_c_t_o_r_s] [-l
  1767.       _v_o_l_u_m_e__l_a_b_e_l]    [-F] [-I _f_s_V_e_r_s_i_o_n] [-S    _s_i_z_e_c_o_d_e] [-2
  1768.       _s_e_c_t_o_r_s__o_n__t_r_a_c_k__0] [-M _s_o_f_t_w_a_r_e__s_e_c_t_o_r__s_i_z_e]    [-a] [-X] [-C]
  1769.       [-H _h_i_d_d_e_n__s_e_c_t_o_r_s] [-r _r_o_o_t__s_e_c_t_o_r_s]    [-B _b_o_o_t__s_e_c_t_o_r] [-0
  1770.       _r_a_t_e__o_n__t_r_a_c_k__0] [-A _r_a_t_e__o_n__o_t_h_e_r__t_r_a_c_k_s] [-1] [-k] _d_r_i_v_e:
  1771.  
  1772.  
  1773.       Mformat adds a minimal MS-DOS    filesystem (boot sector, FAT,
  1774.       and root directory) to a diskette that has already been
  1775.       formatted by a Unix low-level    format.
  1776.  
  1777.  
  1778.  
  1779.      Page 27                         (printed 7/15/98)
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1787.  
  1788.  
  1789.  
  1790.       The following    options    are supported: (The S, 2, 1 and    M
  1791.       options may not exist    if this    copy of    mtools has been
  1792.       compiled without the USE_2M option)
  1793.  
  1794.       t    The number of cylinders.
  1795.  
  1796.       h    The number of heads (sides).
  1797.  
  1798.       s    The number of sectors per track.    If the 2m option is
  1799.            given, number of    512-byte sector    equivalents on generic
  1800.            tracks (i.e. not    head 0 track 0).  If the 2m option is
  1801.            not given, number of physical sectors per track (which
  1802.            may be bigger than 512 bytes).
  1803.  
  1804.       l    An optional volume label.
  1805.  
  1806.       S    The sizecode. The size of the sector is 2 ^ (sizecode +
  1807.            7).
  1808.  
  1809.       2    2m format. The parameter    to this    option describes the
  1810.            number of sectors on track 0, head 0. This option is
  1811.            recommended for sectors bigger than normal.
  1812.  
  1813.       1    don't use a 2m format, even if the current geometry of
  1814.            the disk    is a 2m    geometry.
  1815.  
  1816.       M    software    sector size. This parameter describes the
  1817.            sector size in bytes used by the    MS-DOS filesystem. By
  1818.            default it is the physical sector size.
  1819.  
  1820.       a    If this option is given,    an Atari style serial number
  1821.            is generated.  Ataris store their serial    number in the
  1822.            OEM label.
  1823.  
  1824.       X    formats the disk    as an XDF disk.    See section XDF    for
  1825.            more details. The disk has first    to be low-level
  1826.            formatted using the xdfcopy utility included in the
  1827.            fdutils package.
  1828.  
  1829.       C    creates the disk    image file to install the MS-DOS
  1830.            filesystem on it. Obviously, this is useless on
  1831.            physical    devices    such as    floppies and hard disk
  1832.            partitions.
  1833.  
  1834.       H    number of hidden    sectors. This parameter    is useful for
  1835.            formatting hard disk partition, which are not aligned
  1836.            on track    boundaries (i.e. first head of first track
  1837.            doesn't belong to the partition,    but contains a
  1838.            partition table). In that case the number of hidden
  1839.            sectors is in general the number    of sectors per
  1840.            cylinder. This is untested.
  1841.  
  1842.  
  1843.  
  1844.  
  1845.      Page 28                         (printed 7/15/98)
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1853.  
  1854.  
  1855.  
  1856.       n    serial number
  1857.  
  1858.       F    Format the partition as FAT32 (experimental).
  1859.  
  1860.       I    Sets the    fsVersion id when formatting a FAT32 drive.
  1861.            In order    to find    this out, run minfo on an existing
  1862.            FAT32 drive, and    mail me    about it, so I can include the
  1863.            correct value in    future versions    of mtools.
  1864.  
  1865.       c    Sets the    size of    a cluster (in sectors).     If this
  1866.            cluster size would generate a FAT that too big for its
  1867.            number of bits, mtools automatically increases the
  1868.            cluster size, until the FAT is small enough.
  1869.  
  1870.       r    Sets the    size of    the root directory (in sectors).  Only
  1871.            applicable to 12    and 16 bit FATs.
  1872.  
  1873.       B    Use the bootsector stored in the    given file or device,
  1874.            instead of using    its own.  Only the geometry fields are
  1875.            updated to match    the target disks parameters.
  1876.  
  1877.       k    Keep the    existing boot sector as    much as    possible.
  1878.            Only the    geometry fields    are updated to match the
  1879.            target disks parameters.
  1880.  
  1881.       0    Data transfer rate on track 0
  1882.  
  1883.       A    Data transfer rate on tracks other than 0
  1884.  
  1885.       To format a diskette at a density other than the default,
  1886.       you must supply (at least) those command line    parameters
  1887.       that are different from the default.
  1888.  
  1889.       Mformat returns 0 on success or 1 on failure.
  1890.  
  1891.       It doesn't record bad    block information to the Fat, use
  1892.       mkmanifest for that.
  1893.  
  1894.     MMMMkkkkmmmmaaaannnniiiiffffeeeesssstttt
  1895.       The mkmanifest command is used to create a shell script
  1896.       (packing list) to restore Unix filenames. Its    syntax is:
  1897.  
  1898.       mkmanifest [ _f_i_l_e_s ]
  1899.  
  1900.       Mkmanifest creates a shell script that aids in the
  1901.       restoration of Unix filenames    that got clobbered by the MS-
  1902.       DOS filename restrictions.  MS-DOS filenames are restricted
  1903.       to 8 character names,    3 character extensions,    upper case
  1904.       only,    no device names, and no    illegal    characters.
  1905.  
  1906.       The mkmanifest program is compatible with the    methods    used
  1907.       in pcomm, arc, and mtools to change perfectly    good Unix
  1908.  
  1909.  
  1910.  
  1911.      Page 29                         (printed 7/15/98)
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1919.  
  1920.  
  1921.  
  1922.       filenames to fit the MS-DOS restrictions. This command is
  1923.       only useful if the target system which will read the
  1924.       diskette cannot handle vfat long names.
  1925.  
  1926.       EEEExxxxaaaammmmpppplllleeee
  1927.       You want to copy the following Unix files to a MS-DOS
  1928.       diskette (using the mcopy command).
  1929.  
  1930.            vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee
  1931.            2222....mmmmaaaannnnyyyy....ddddoooottttssss
  1932.            iiiilllllllleeeeggggaaaallll::::
  1933.            ggggoooooooodddd....cccc
  1934.            pppprrrrnnnn....ddddeeeevvvv
  1935.            CCCCaaaappppiiiittttaaaallll
  1936.  
  1937.  
  1938.  
  1939.       Mcopy    converts the names to:
  1940.  
  1941.            vvvveeeerrrryyyy____lllloooonnnn
  1942.            2222xxxxmmmmaaaannnnyyyy....ddddooootttt
  1943.            iiiilllllllleeeeggggaaaallllxxxx
  1944.            ggggoooooooodddd....cccc
  1945.            xxxxpppprrrrnnnn....ddddeeeevvvv
  1946.            ccccaaaappppiiiittttaaaallll
  1947.  
  1948.  
  1949.  
  1950.       The command:
  1951.  
  1952.          mmmmkkkkmmmmaaaannnniiiiffffeeeesssstttt    vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee 2222....mmmmaaaannnnyyyy....ddddoooottttssss iiiilllllllleeeeggggaaaallll:::: ggggoooooooodddd....cccc pppprrrrnnnn....ddddeeeevvvv CCCCaaaappppiiiittttaaaallll >>>>mmmmaaaannnniiiiffffeeeesssstttt
  1953.  
  1954.       would    produce    the following:
  1955.  
  1956.            mmmmvvvv vvvveeeerrrryyyy____lllloooonnnn vvvveeeerrrryyyy____lllloooonnnngggg____nnnnaaaammmmeeee
  1957.            mmmmvvvv 2222xxxxmmmmaaaannnnyyyy....ddddooootttt 2222....mmmmaaaannnnyyyy....ddddoooottttssss
  1958.            mmmmvvvv iiiilllllllleeeeggggaaaallllxxxx iiiilllllllleeeeggggaaaallll::::
  1959.            mmmmvvvv xxxxpppprrrrnnnn....ddddeeeevvvv pppprrrrnnnn....ddddeeeevvvv
  1960.            mmmmvvvv ccccaaaappppiiiittttaaaallll CCCCaaaappppiiiittttaaaallll
  1961.  
  1962.  
  1963.  
  1964.       Notice that "good.c" did not require any conversion, so it
  1965.       did not appear in the    output.
  1966.  
  1967.       Suppose I've copied these files from the diskette to another
  1968.       Unix system, and I now want the files    back to    their original
  1969.       names.  If the file "manifest" (the output captured above)
  1970.       was sent along with those files, it could be used to convert
  1971.       the filenames.
  1972.  
  1973.       BBBBuuuuggggssss
  1974.  
  1975.  
  1976.  
  1977.      PPPPaaaaggggeeee 33330000                         ((((pppprrrriiiinnnntttteeeedddd 7777////11115555////99998888))))
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  1985.  
  1986.  
  1987.  
  1988.       The short names generated by mkmanifest follow the old
  1989.       convention (from mtools-2.0.7) and not the one from Windows
  1990.       95 and mtools-3.0.
  1991.  
  1992.     MMMMiiiinnnnffffoooo
  1993.       The minfo command prints the parameters of a Dos filesystem,
  1994.       such as number of sectors, heads and cylinders.  It also
  1995.       prints an mformat command line which can be used to create a
  1996.       similar Dos filesystem on another media.  However, this
  1997.       doesn't work with 2m or Xdf media, and with Dos 1.0
  1998.       filesystems minfo _d_r_i_v_e:
  1999.  
  2000.  
  2001.       Mlabel supports the following    option:
  2002.  
  2003.       v    Prints a    hexdump    of the bootsector, in addition to the
  2004.            other information
  2005.  
  2006.     MMMMllllaaaabbbbeeeellll
  2007.       The mlabel command adds a volume label to a disk. Its    syntax
  2008.       is:  mlabel [-vcs] _d_r_i_v_e:[_n_e_w__l_a_b_e_l]
  2009.  
  2010.  
  2011.       Mlabel displays the current volume label, if present.    If
  2012.       _n_e_w__l_a_b_e_l is not given, and if neither the c nor the s
  2013.       options are set, it prompts the user for a new volume    label.
  2014.       To delete an existing    volume label, press return at the
  2015.       prompt.
  2016.  
  2017.       Reasonable care is taken to create a valid MS-DOS volume
  2018.       label.  If an    invalid    label is specified, mlabel changes the
  2019.       label    (and displays the new label if the verbose mode    is
  2020.       set).    Mlabel returns 0 on success or 1 on failure.
  2021.  
  2022.       Mlabel supports the following    options:
  2023.  
  2024.       c    Clears an existing label, without prompting the user
  2025.  
  2026.       s    Shows the existing label, without prompting the user.
  2027.  
  2028.     MMMMmmmmdddd
  2029.       The mmd command is used to make an MS-DOS subdirectory. Its
  2030.       syntax is:
  2031.  
  2032.       mmd [-voOsSrRA] _m_s_d_o_s_d_i_r_e_c_t_o_r_y [ _m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s... ]
  2033.  
  2034.       Mmd makes a new directory on an MS-DOS filesystem. An    error
  2035.       occurs if the    directory already exists.
  2036.  
  2037.     MMMMmmmmoooouuuunnnntttt
  2038.       The mmount command is    used to    mount an MS-DOS    disk. It is
  2039.       only available on Linux, as it is only useful    if the OS
  2040.  
  2041.  
  2042.  
  2043.      Page 31                         (printed 7/15/98)
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2051.  
  2052.  
  2053.  
  2054.       kernel allows    to configure the disk geometry.    Its syntax is:
  2055.  
  2056.       mmount _m_s_d_o_s_d_r_i_v_e [_m_o_u_n_t_a_r_g_s]
  2057.  
  2058.       Mmount reads the boot    sector of an MS-DOS disk, configures
  2059.       the drive geometry, and finally mounts it passing mountargs
  2060.       to mount. If no mount    arguments are specified, the name of
  2061.       the device is    used. If the disk is write protected, it is
  2062.       automatically    mounted    read only.
  2063.  
  2064.     MMMMmmmmoooovvvveeee
  2065.       The mmove command is used to moves or    renames    an existing
  2066.       MS-DOS file or subdirectory.    mmove [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e
  2067.       _t_a_r_g_e_t_f_i_l_e mmove [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e [ _s_o_u_r_c_e_f_i_l_e_s... ]
  2068.       _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
  2069.  
  2070.       Mmove    moves or renames an existing MS-DOS file or
  2071.       subdirectory.    Unlike the MS-DOS version of MOVE, mmove is
  2072.       able to move subdirectories.    Files or directories can only
  2073.       be moved within one filesystem. Data cannot be moved from
  2074.       Dos to Unix or vice-versa.  If you omit the drive letter
  2075.       from the target file or directory, the same letter as    for
  2076.       the source is    assumed.  If you omit the drive    letter from
  2077.       all parameters, drive    a: is assumed by default.
  2078.  
  2079.     MMMMppppaaaarrrrttttiiiittttiiiioooonnnn
  2080.       The mpartition command is used to create MS-DOS filesystems
  2081.       as partitions.  This is intended to be used on non-Linux
  2082.       systems, i.e.    systems    where fdisk and    easy access to Scsi
  2083.       devices are not available.  This command only    works on
  2084.       drives whose partition variable is set.
  2085.  
  2086.       mpartition -p    _d_r_i_v_e mpartition -r _d_r_i_v_e mpartition -I    _d_r_i_v_e
  2087.       mpartition -a    _d_r_i_v_e mpartition -d _d_r_i_v_e mpartition -c    [-s
  2088.       _s_e_c_t_o_r_s] [-h _h_e_a_d_s] [-t _c_y_l_i_n_d_e_r_s] [-v [-T _t_y_p_e] [-b _b_e_g_i_n]
  2089.       [-l length] [-f]
  2090.  
  2091.  
  2092.       Mpartition supports the following operations:
  2093.  
  2094.       p    Prints a    command    line to    recreate the partition for the
  2095.            drive.  Nothing is printed if the partition for the
  2096.            drive is    not defined, or    an inconsistency has been
  2097.            detected.  If verbose (-v) is also set, prints the
  2098.            current partition table.
  2099.  
  2100.       r    Removes the partition described by _d_r_i_v_e.
  2101.  
  2102.       I    Initializes the partition table,    and removes all
  2103.            partitions.
  2104.  
  2105.       c    Creates the partition described by _d_r_i_v_e.
  2106.  
  2107.  
  2108.  
  2109.      Page 32                         (printed 7/15/98)
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2117.  
  2118.  
  2119.  
  2120.       a    "Activates" the partition, i.e. makes it    bootable.
  2121.            Only one    partition can be bootable at a time.
  2122.  
  2123.       d    "Desactivates" the partition, i.e. makes    it unbootable.
  2124.  
  2125.       If no    operation is given, the    current    settings are printed.
  2126.  
  2127.       For partition    creations, the following options are
  2128.       available:
  2129.  
  2130.       s _s_e_c_t_o_r_s
  2131.            The number of sectors per track of the partition    (which
  2132.            is also the number of sectors per track for the whole
  2133.            drive).
  2134.  
  2135.       h _h_e_a_d_s
  2136.            The number of heads of the partition (which is also the
  2137.            number of heads for the whole drive).  By default, the
  2138.            geometry    information (number of sectors and heads) is
  2139.            figured out from    neighbouring partition table entries,
  2140.            or guessed from the size.
  2141.  
  2142.       t _c_y_l_i_n_d_e_r_s
  2143.            The number of cylinders of the partition    (not the
  2144.            number of cylinders of the whole    drive.
  2145.  
  2146.       b _b_e_g_i_n
  2147.            The starting offset of the partition, expressed in
  2148.            sectors.    If begin is not    given, mpartition lets the
  2149.            partition begin at the start of the disk    (partition
  2150.            number 1), or immediately after the end of the previous
  2151.            partition.
  2152.  
  2153.       l _l_e_n_g_t_h
  2154.            The size    (length) of the    partition, expressed in
  2155.            sectors.     If end    is not given, mpartition figures out
  2156.            the size    from the number    of sectors, heads and
  2157.            cylinders.  If these are    not given either, it gives the
  2158.            partition the biggest possible size, considering    disk
  2159.            size and    start of the next partition.
  2160.  
  2161.       The following    option is available for    all operation which
  2162.       modify the partition table:
  2163.  
  2164.       f    Usually,    before writing back any    changes    to the
  2165.            partition, mpartition performs certain consistenct
  2166.            checks, such as checking    for overlaps and proper
  2167.            alignment of the    partitions.  If    any of these checks
  2168.            fails, the partition table is not changes.  The -f
  2169.            allows you to override these safeguards.
  2170.  
  2171.       The following    option is available for    all operations:
  2172.  
  2173.  
  2174.  
  2175.      Page 33                         (printed 7/15/98)
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2183.  
  2184.  
  2185.  
  2186.       v    Together    with -p    prints the partition table as it is
  2187.            now (no change operation), or as    it is after it is
  2188.            modified.
  2189.  
  2190.       vv   If the verbosity    flag is    given twice, mpartition    will
  2191.            print out a hexdump of the partition table when reading
  2192.            it from and writing it to the device.
  2193.  
  2194.     MMMMrrrrdddd
  2195.       The mrd command is used to remove an MS-DOS subdirectory.
  2196.       Its syntax is:
  2197.  
  2198.       mrd [-v] _m_s_d_o_s_d_i_r_e_c_t_o_r_y [ _m_s_d_o_s_d_i_r_e_c_t_o_r_i_e_s...    ]
  2199.  
  2200.  
  2201.       Mrd removes a    directory from an MS-DOS filesystem. An    error
  2202.       occurs if the    directory does not exist or is not empty.
  2203.  
  2204.     MMMMrrrreeeennnn
  2205.       The mren command is used to rename or    move an    existing MS-
  2206.       DOS file or subdirectory. Its    syntax is:
  2207.  
  2208.       mren [-voOsSrRA] _s_o_u_r_c_e_f_i_l_e _t_a_r_g_e_t_f_i_l_e
  2209.  
  2210.  
  2211.       Mren renames an existing file    on an MS-DOS filesystem.
  2212.  
  2213.       In verbose mode, Mren    displays the new filename if the name
  2214.       supplied is invalid.
  2215.  
  2216.       If the first syntax is used (only one    sourcefile), and if
  2217.       the target name doesn't contain any slashes or colons, the
  2218.       file (or subdirectory) is renamed in the same    directory,
  2219.       instead of being moved to the    current    mcd directory as would
  2220.       be the case with mmove. Unlike the MS-DOS version of REN,
  2221.       mren can be used to rename directories.
  2222.  
  2223.     MMMMsssshhhhoooowwwwffffaaaatttt
  2224.       The mshowfat command is used to display the FAT entries for
  2225.       a file.  Syntax:
  2226.  
  2227.       $ mshowfat files
  2228.  
  2229.  
  2230.     MMMMttttoooooooollllsssstttteeeesssstttt
  2231.       The mtoolstest command is used to tests the mtools
  2232.       configuration    files. To invoke it, just type mtoolstest
  2233.       without any arguments.  Mtoolstest reads the mtools
  2234.       configuration    files, and prints the cumulative configuration
  2235.       to stdout. The output    can be used as a configuration file
  2236.       itself (although you might want to remove redundant
  2237.       clauses).  You may use this program to convert old-style
  2238.  
  2239.  
  2240.  
  2241.      Page 34                         (printed 7/15/98)
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2249.  
  2250.  
  2251.  
  2252.       configuration    files into new style configuration files.
  2253.  
  2254.     MMMMttttyyyyppppeeee
  2255.       The mtype command is used to display contents    of an MS-DOS
  2256.       file.    Its syntax is:
  2257.  
  2258.       mtype    [-ts] _m_s_d_o_s_f_i_l_e    [ _m_s_d_o_s_f_i_l_e_s...    ]
  2259.  
  2260.  
  2261.       Mtype    displays the specified MS-DOS file on the screen.
  2262.  
  2263.       In addition to the standard options, Mtype allows the
  2264.       following command line options:
  2265.  
  2266.       t    Text file viewing.  Mtype translates incoming carriage
  2267.            return/line feeds to line feeds.
  2268.  
  2269.       s    Mtype strips the    high bit from the data.
  2270.  
  2271.       The mcd command may be used to establish the device and the
  2272.       current working directory (relative to MS-DOS), otherwise
  2273.       the default is A:/.
  2274.  
  2275.       Mtype    returns    0 on success, 1    on utter failure, or 2 on
  2276.       partial failure.
  2277.  
  2278.       Unlike the MS-DOS version of TYPE, mtype allows multiple
  2279.       arguments.
  2280.  
  2281.     MMMMzzzziiiipppp
  2282.       The mzip command is used to issue ZIP    disk specific commands
  2283.       on Solaris or    HPUX. Its syntax is:
  2284.  
  2285.       mzip [-epqrwx]
  2286.  
  2287.  
  2288.       Mzip allows the following command line options:
  2289.  
  2290.       e    Ejects the disk.
  2291.  
  2292.       f    Force eject even    if the disk is mounted (must be    given
  2293.            in addition to -e).
  2294.  
  2295.       r    Write protect the disk.
  2296.  
  2297.       w    Remove write protection.
  2298.  
  2299.       p    Password    write protect.
  2300.  
  2301.       x    Password    protect
  2302.  
  2303.       u    Temporarily unprotect the disk until it is ejected.
  2304.  
  2305.  
  2306.  
  2307.      Page 35                         (printed 7/15/98)
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2315.  
  2316.  
  2317.  
  2318.            The disk    becomes    writable, and reverts back to its old
  2319.            state when ejected.
  2320.  
  2321.       q    Queries the status
  2322.  
  2323.       To remove the    password, set it to one    of the passwordless
  2324.       modes    -r or -w: mzip will then ask you for the password, and
  2325.       unlock the disk.  If you have    forgotten the password,    you
  2326.       can get rid of it by low-level formatting the    disk (using
  2327.       your SCSI adaptor's BIOS setup).
  2328.  
  2329.       The ZipTools disk shipped with the drive is also password
  2330.       protected.  On Dos or    on a Mac, this password    is
  2331.       automatically    removed    once the ZipTools have been installed.
  2332.       From various articles    posted to Usenet, I learned that the
  2333.       password for the tools disk is APlaceForYourStuff.  Mzip
  2334.       knows    about this password, and tries it first, before
  2335.       prompting you    for a password.     Thus mzip -w z: unlocks the
  2336.       tools    disk.  The tools disk is formatted in a    special    way so
  2337.       as to    be usable both in a PC and in a    Mac.  On a PC, the Mac
  2338.       filesystem appears as    a hidden file named `partishn.mac'.
  2339.       You may erase    it to reclaim the 50 Megs of space taken up by
  2340.       the Mac filesystem.
  2341.  
  2342.     XXXXccccooooppppyyyy
  2343.       The xcopy script is used to recursively copy one directory
  2344.       to another. Its syntax is:
  2345.  
  2346.       xcopy    _s_o_u_r_c_e_d_i_r_e_c_t_o_r_y    _t_a_r_g_e_t_d_i_r_e_c_t_o_r_y
  2347.  
  2348.  
  2349.       If targetdirectory does not exist, it    is created.  If    it
  2350.       does exist, the files    of sourcedirectory are directly    copied
  2351.       into it, and no subdirectory called _s_o_u_r_c_e_d_i_r_e_c_t_o_r_y is
  2352.       created, unlike with cp -rf.
  2353.  
  2354.       BBBBuuuuggggssss
  2355.       This command is a big    kludge.     A proper implementation would
  2356.       take a rework    of significant parts of    mtools,    but
  2357.       unfortunately    I don't    have the time for this right now. The
  2358.       main downside    of this    implementation is that it is
  2359.       inefficient on some architectures (several successive    calls
  2360.       to mtools, which defeats mtools' caching).
  2361.  
  2362.      AAAArrrrcccchhhhiiiitttteeeeccccttttuuuurrrreeee ssssppppeeeecccciiiiffffiiiicccc ccccoooommmmppppiiiillllaaaattttiiiioooonnnn ffffllllaaaaggggssss
  2363.       To compile mtools, first invoke ./configure before make. In
  2364.       addition to the standard autoconfigure flags,    there are two
  2365.       architecture specific    flags available.
  2366.  
  2367.       ./configure --enable-xdf
  2368.       ./configure --disable-xdf
  2369.            Enables support for XDF disks. This is on by default.
  2370.  
  2371.  
  2372.  
  2373.      Page 36                         (printed 7/15/98)
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2381.  
  2382.  
  2383.  
  2384.            See section XDF,    for details.
  2385.  
  2386.       ./configure --enable-vold
  2387.       ./configure --disable-vold
  2388.            Enables support for vold    on Solaris. When used in
  2389.            conjunction with    vold, mtools should uses different
  2390.            device nodes as for direct access.
  2391.  
  2392.       ./configure --enable-new-vold
  2393.       ./configure --disable-new-vold
  2394.            Enables new support for vold on Solaris.     This is
  2395.            supposed    to work    more smoothly than the old support.
  2396.  
  2397.       ./configure --enable-floppyd
  2398.       ./configure --disable-floppyd
  2399.            Enables support for floppyd.  By    default, floppyd
  2400.            support is enabled as long as the necessary X includes
  2401.            and libraries are available.
  2402.  
  2403.      PPPPoooorrrrttttiiiinnnngggg mmmmttttoooooooollllssss ttttoooo aaaarrrrcccchhhhiiiitttteeeeccccttttuuuurrrreeeessss wwwwhhhhiiiicccchhhh aaaarrrreeee nnnnooootttt ssssuuuuppppppppoooorrrrtttteeeedddd yyyyeeeetttt
  2404.        This    chapter    is only    interesting for    those who want to port
  2405.       mtools to an architecture which is not yet supported.    For
  2406.       most common systems, default drives are already defined. If
  2407.       you want to add default drives for a still unsupported
  2408.       system, run config.guess, to see which identification
  2409.       autoconf uses    for that system. This identification is    of the
  2410.       form cpu-vendor-os (for example sparc-sun-sunos). The    cpu
  2411.       and the os parts are passed to the compiler as preprocessor
  2412.       flags.
  2413.        The OS part is passed to the    compiler in three forms.
  2414.  
  2415.       1.   The complete os name, with dots replaced    by
  2416.            underscores.  sco3.2v2 would yield sco3_2v2
  2417.  
  2418.       2.   The base    os name. Sco3.2v2 would    yield Sco
  2419.  
  2420.       3.   The base    os name    plus its major version.    Sco3.2v2 would
  2421.            yield Sco3
  2422.  
  2423.        All three versions are passed, if they are different.
  2424.  
  2425.        To define the devices, use the entries for the systems that
  2426.       are already present as templates. In general,    they have the
  2427.       following form:
  2428.  
  2429.          ####iiiiffff ((((ddddeeeeffffiiiinnnneeeedddd ((((mmmmyyyy____ccccppppuuuu)))) &&&&&&&& ddddeeeeffffiiiinnnneeeedddd((((mmmmyyyy____oooossss))))))))
  2430.          ####ddddeeeeffffiiiinnnneeee pppprrrreeeeddddeeeeffffiiiinnnneeeedddd____ddddeeeevvvviiiicccceeeessss
  2431.          ssssttttrrrruuuucccctttt ddddeeeevvvviiiicccceeee ddddeeeevvvviiiicccceeeessss[[[[]]]] ==== {{{{
  2432.              {{{{ """"////ddddeeeevvvv////ffffiiiirrrrsssstttt____ddddrrrriiiivvvveeee"""",,,, ''''ddddrrrriiiivvvveeee____lllleeeetttttttteeeerrrr'''',,,, ddddrrrriiiivvvveeee____ddddeeeessssccccrrrriiiippppttttiiiioooonnnn}}}},,,,
  2433.              ............
  2434.              {{{{ """"////ddddeeeevvvv////llllaaaasssstttt____ddddrrrriiiivvvveeee"""",,,, ''''ddddrrrriiiivvvveeee____lllleeeetttttttteeeerrrr'''',,,, ddddrrrriiiivvvveeee____ddddeeeessssccccrrrriiiippppttttiiiioooonnnn}}}}
  2435.          }}}}
  2436.  
  2437.  
  2438.  
  2439.      Page 37                         (printed 7/15/98)
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2447.  
  2448.  
  2449.  
  2450.          ####ddddeeeeffffiiiinnnneeee IIIINNNNIIIITTTT____NNNNOOOOOOOOPPPP
  2451.          ####eeeennnnddddiiiiffff
  2452.  
  2453.  
  2454.  
  2455.        "/dev/first_drive" is the name of the device    or image file
  2456.       representing the drive. Drive_letter is a letter ranging
  2457.       from a to z giving access to the drive. Drive_description
  2458.       describes the    type of    the drive:
  2459.  
  2460.       ED312
  2461.            extra density (2.88M) 3 1/2 disk
  2462.  
  2463.       HD312
  2464.            high density 3 1/2 disk
  2465.  
  2466.       DD312
  2467.            double density 3    1/2 disk
  2468.  
  2469.       HD514
  2470.            high density 5 1/4 disk
  2471.  
  2472.       DD514
  2473.            double density 5    1/4 disk
  2474.  
  2475.       DDsmall
  2476.            8 sector    double density 5 1/4 disk
  2477.  
  2478.       SS514
  2479.            single sided double density 5 1/4 disk
  2480.  
  2481.       SSsmall
  2482.            single sided 8 sector double density 5 1/4 disk
  2483.  
  2484.       GENFD
  2485.            generic floppy drive (12    bit FAT)
  2486.  
  2487.       GENHD
  2488.            generic hard disk (16 bit FAT)
  2489.  
  2490.       GEN  generic device (all parameters match)
  2491.  
  2492.       ZIPJAZ(flags)
  2493.            generic ZIP drive using normal access. This uses
  2494.            partition 4.  Flags are any special flags to be passed
  2495.            to open.
  2496.  
  2497.       RZIPJAZ(flags)
  2498.            generic ZIP drive using raw SCSI    access.    This uses
  2499.            partition 4.  Flags are any special flags to be passed
  2500.            to open.
  2501.  
  2502.  
  2503.  
  2504.  
  2505.      Page 38                         (printed 7/15/98)
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2513.  
  2514.  
  2515.  
  2516.       REMOTE
  2517.            the remote drive    used for floppyd.  Unlike the other
  2518.            items, this macro also includes the file    name
  2519.            ($DISPLAY) and the drive    letter (X)
  2520.  
  2521.        Entries may be described in more detail:
  2522.  
  2523.           ffffaaaatttt____bbbbiiiittttssss,,,,ooooppppeeeennnn____ffffllllaaaaggggssss,,,,ccccyyyylllliiiinnnnddddeeeerrrrssss,,,,hhhheeeeaaaaddddssss,,,,sssseeeeccccttttoooorrrrssss,,,,DDDDEEEEFFFF____AAAARRRRGGGG
  2524.  
  2525.        or, if you need to describe an offset (filesystem doesn't
  2526.       start    at beginning of    filesystem)
  2527.  
  2528.           ffffaaaatttt____bbbbiiiittttssss,,,,    ooooppppeeeennnn____ffffllllaaaaggggssss,,,, ccccyyyylllliiiinnnnddddeeeerrrrssss,,,, hhhheeeeaaaaddddssss,,,, sssseeeeccccttttoooorrrrssss,,,, ooooffffffffsssseeeetttt,,,, DDDDEEEEFFFF____AAAARRRRGGGG0000
  2529.  
  2530.  
  2531.  
  2532.       fat_bits
  2533.            is either 12, 16    or 0. 0    means that the device accepts
  2534.            both types of FAT.
  2535.  
  2536.       open_flags
  2537.            may include flags such as O_NDELAY, or O_RDONLY,    which
  2538.            might be    necessary to open the device. 0    means no
  2539.            special flags are needed.
  2540.  
  2541.       cylinders,heads,sectors
  2542.            describe    the geometry of    the disk. If cylinders is 0,
  2543.            the heads and sectors parameters    are ignored, and the
  2544.            drive accepts any geometry.
  2545.  
  2546.       offset
  2547.            is used if the DOS filesystem doesn't begin at the
  2548.            start of    the device or image file. This is mostly
  2549.            useful for Atari    Ram disks (which contain their device
  2550.            driver at the beginning of the file) or for DOS
  2551.            emulator    images (which may represent a partitioned
  2552.            device.
  2553.  
  2554.        Definition of defaults in the devices file should only be
  2555.       done if these    same devices are found on a large number of
  2556.       hosts    of this    type. In that case, could you also let me know
  2557.       about    your new definitions, so that I    can include them into
  2558.       the next release.  For purely    local file, I recommend    that
  2559.       you use the /usr/freeware/etc/mtools.conf and    ~/.mtoolsrc
  2560.       configuration    files.
  2561.  
  2562.        However, the    devices    files also allows to supply geometry
  2563.       setting routines. These are necessary    if you want to access
  2564.       high capacity    disks.
  2565.  
  2566.        Two routines    should be supplied:
  2567.  
  2568.  
  2569.  
  2570.  
  2571.      Page 39                         (printed 7/15/98)
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2579.  
  2580.  
  2581.  
  2582.       1.   Reading the current parameters
  2583.  
  2584.           ssssttttaaaattttiiiicccc iiiinnnnlllliiiinnnneeee    iiiinnnntttt ggggeeeetttt____ppppaaaarrrraaaammmmeeeetttteeeerrrrssss((((iiiinnnntttt ffffdddd,,,, ssssttttrrrruuuucccctttt ggggeeeennnneeeerrrriiiicccc____ffffllllooooppppppppyyyy____ssssttttrrrruuuucccctttt    ****ffffllllooooppppppppyyyy))))
  2585.  
  2586.  
  2587.  
  2588.         This probes the    current    configured geometry, and
  2589.            return it in the    structure generic_floppy_struct    (which
  2590.            must also be declared).
  2591.         Fd is an open file descriptor for the device, and buf
  2592.            is an already filled in stat structure, which may be
  2593.            useful.
  2594.         This routine should return 1 if    the probing fails, and
  2595.            0 otherwise.
  2596.  
  2597.       2.   Setting new parameters
  2598.  
  2599.           ssssttttaaaattttiiiicccc iiiinnnnlllliiiinnnneeee    iiiinnnntttt sssseeeetttt____ppppaaaarrrraaaammmmeeeetttteeeerrrrssss((((iiiinnnntttt ffffdddd,,,, ssssttttrrrruuuucccctttt ggggeeeennnneeeerrrriiiicccc____ffffllllooooppppppppyyyy____ssssttttrrrruuuucccctttt    ****ffffllllooooppppppppyyyy))))
  2600.                            ssssttttrrrruuuucccctttt ssssttttaaaatttt ****bbbbuuuuffff))))
  2601.  
  2602.         This configures    the geometry contained in floppy on
  2603.            the file    descriptor fd. Buf is the result of a stat
  2604.            call (already filled in).  This should return 1 if the
  2605.            new geometry cannot be configured, and 0    otherwise.
  2606.  
  2607.        A certain number of preprocessor macros should also be
  2608.       supplied:
  2609.  
  2610.       TRACKS(floppy)
  2611.            refers to the track field in the    floppy structure
  2612.  
  2613.       HEADS(floppy)
  2614.            refers to the heads field in the    floppy structure
  2615.  
  2616.       SECTORS(floppy)
  2617.            refers to the sectors per track field in    the floppy
  2618.            structure
  2619.  
  2620.       SECTORS_PER_DISK(floppy)
  2621.            refers to the sectors per disk field in the floppy
  2622.            structure (if applicable, otherwise leave undefined)
  2623.  
  2624.       BLOCK_MAJOR
  2625.            major number of the floppy device, when viewed as a
  2626.            block device
  2627.  
  2628.       CHAR_MAJOR
  2629.            major number of the floppy device, when viewed as a
  2630.            character device    (a.k.a.    "raw" device, used for fsck)
  2631.            (leave this undefined, if your OS doesn't have raw
  2632.            devices)
  2633.  
  2634.  
  2635.  
  2636.  
  2637.      Page 40                         (printed 7/15/98)
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.      mmmmttttoooooooollllssss....1111((((3333))))        MMMMTTTTOOOOOOOOLLLLSSSS ((((11114444mmmmaaaarrrr1111999999997777))))           mmmmttttoooooooollllssss....1111((((3333))))
  2645.  
  2646.  
  2647.  
  2648.        For the truly high capacity formats (XDF, 2m, etc), there
  2649.       is no    clean and documented interface yet.
  2650.  
  2651.      SSSSeeeeeeee aaaallllssssoooo
  2652.       mattrib mbadblocks mcd mcopy mdel mdeltree mdir mdu mformat
  2653.       mkmanifest mlabel mmd    mmount mmove mrd mread mren mtoolstest
  2654.       mtype
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.      Page 41                         (printed 7/15/98)
  2704.  
  2705.  
  2706.  
  2707.